So I created a form that used windows.forms and I was moving it over to web based. Now in there, there was DataGridView. does not use that. So when I try the same thing.

using (var  = new ())
                    var v = from l in .Logins
                            where l.LogoutTime == null &&
                                  l.DurationMinutes == null
                            select new
                                User = l.User,
                                LoginTime = l.LoginTime

                    if (v != null)
                        Grid.DataSource = v;

I did that with DataGrid but did not get the same outcome. If I try to link it with linkDataSource I get
this error.

Both DataSource and DataSourceID are defined on 'Grid'.  Remove one definition.

So was wondering any way of using datagridview in or anyway of using my gridview without getting that error?

okaay I figured it out I am using

Grid.DataSource = login;

But now it is showing EVERYTHING in the table

I only want to show the the people who are online.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.