How to bing the gridview in linq dynamically

Posted by Cnagasa under C# on 12/20/2011 | Points: 10 | Views : 1230 | Status : [Member] | Replies : 2
hi every one,

i have how to bind the gridview dynamically using the linq

plz send me the example

Regard's

sudarshan.c


Responses

Posted by: SheoNarayan on: 12/20/2011 [Administrator] HonoraryPlatinum | Points: 25

Up
0
Down
Its simple.

Create a linq collection and set the DataSource.

var data = from d in db.Tables

where d.FirstName = 'ram'
select d;
GridView1.DataSource = data;
GridView1.Databind();


Thanks

Regards,
Sheo Narayan
http://www.dotnetfunda.com

Cnagasa, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: perfectchourasia-9163 on: 12/20/2011 [Member] Starter | Points: 25

Up
0
Down
http://sandeep-chourasia.blogspot.com/2011/05/use-of-dynamic-hyperlink-to-gridview.html

ER sandeep chourasia
sandeepchrs@yahoo.com (on facebook)
http://www.aspnetcodes.com/

Cnagasa, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response