SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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
up vote 0 down vote accepted


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



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


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.