Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

How to bind spgrideview using linqdatasource ?

share|improve this question
    
You can bind it normally, what problems are you facing? –  Prashant Lakhlani Oct 31 '12 at 11:55
    
I dont know how to bind using linqdatasource. I know how to bind with objectdatasource with returning datatable . –  Rajesh Joshi Oct 31 '12 at 12:07

1 Answer 1

up vote 0 down vote accepted

ASP:

<SharePoint:SpGridView datasourceid = "<linqdatasourceid>">

OR

C#:

MySpGridView.datasourceid = "<linqdatasourceid>"

If you are asking how to use a LinqDataSource see This MSDN Article.

You can connect the linq datasource to an entity class and use linq on it from c# or asp.

Personally when I connect sharepoint data to a SpGridView I just set the .DataSource property in the behind code with my data and rebind as needed.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.