Hi,
I know by using we can bind the table to gridview like this:
dataGridView1.DataSource=( from customer in db.Customers
where customer.Country == "USA"
orderby customer.CompanyName
select new { customer.CustomerID,
customer.City }).ToBindingList();
In this case can we declare the gridview in aspx page with
>
can we do like this in aspx page.
Thanks
Vinay SinghPosted Aug 29, 2016, 3:40 AM
where customer.Country == "USA"
orderby customer.CompanyName
select new { customer.CustomerID,
customer.City }).ToBindingList();
Midhun TpPosted Aug 29, 2016, 2:42 AM
where customer.Country == "USA"
orderby customer.CompanyName
select new {CustomerID=customer.CustomerID,
City =customer.City }).ToList();