1

How I can (if I can) read a sharepoint LIST in a DATATABLE way?

2 Answers 2

3

As far as i understand your query, you can use following code:

using (var site = new SPSite("http://yourserver/"))
{
   using(var web = site.OpenWeb())
   {
      var list = web.GetList("YourListUrl");
      var dataTable = list.Items.GetDataTable();
      // your code
   }
}
1

If you don't want to a coded solution, you can always go to the LIST-tab and hit the Quick Edit Button and you have your datatable rigt out of the box.

enter image description here

1
  • Thanks Benny but I nne it programatically ;)
    – JulianoG
    Sep 8, 2014 at 10:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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