DataGridView and LINQ
So I have created a DataContext, formed my query, bound the query to my bindingSource, and bound the bindingSource to my dataGridView. However, nothing displays on my form. What have I missed? Thanks.
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
ramesh pPosted Apr 15, 2009, 1:13 AM
try like this....
WebFleetEntities entities = new WebFleetEntities();
var query = from c in entities.Gen_MDT
select c;
grdvGenMDTTypes.DataSource = query;
grdvGenMDTTypes.DataBind();