0

So I created a form that used windows.forms and I was moving it over to web based. Now in there, there was DataGridView. Asp.net 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 asp.net or anyway of using my gridview without getting that error?

1
Contributor
1
Reply
10
Views
4 Years
Discussion Span
Last Post by Kratoswoo
0

okaay I figured it out I am using

Grid.DataSource = login;
                    Grid.DataBind();

But now it is showing EVERYTHING in the table

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

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.