How I can (if I can) read a sharepoint LIST in a DATATABLE way?
2 Answers
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
}
}
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.