Click here to Skip to main content
15,885,908 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
C#
var perDetail = from pd in cr.PersonalDetails
                            where pd.UserId ==(Guid)s
                            select pd;
            grvDisplay.DataSource = perDetail;
            grvDisplay.DataBind();
            grvDisplay.EditIndex = 0;
Posted

You may want to add a LinqDataSource to your webpage, and bind the grid to the LinqDataSource.

Then you perform your linq query like you do in your code, and set the DataSource property of the LinqDataSource to perDetail

Good Luck,

Eduard
 
Share this answer
 
I bet one (or more) of the fields in the dataset returned by your query is null...
 
Share this answer
 
Comments
Vineet_2109 21-Mar-11 10:00am    
hey hey sorry guys by mistake i didnt updated my DBML file...

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