Click here to Skip to main content
15,888,968 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I have created a table in database and i am retreiving the data from the database using linq query.now i want to load the grid using this linq object in dhtmlx.

Any suggestions..
Posted

You can also use LinqDataSource component. Put it on page, setup qurey and parameters and set GridView's DataSourceID to that LinqDataSource.
 
Share this answer
 
Let suppose your query is:

C#
public IQueryable Records()
       {
          var qry=from a in table1 select a;
          return qry;
       }


Then:

C#
GridView1.DataSource=Records();
GridView1.DataBind();


It will work.
 
Share this answer
 
v2
Comments
charan1431 17-May-12 5:12am    
var query = from i in dbContext.Personaldetails
where i.ID == 1
select i;
DataTable table = query.CopyToDataTable();
i want to use datatable and copy to datatable method.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900