In Server Side Object Model (SSOM) to return listitemcollection into datatable, we can just write SPListItemCollection.GetDataTable()

What is its equivalent in CSOM?

I found this link which has code to return listitemcollection to datatbale http://sp77.blogspot.in/2015/04/listitemcollection-as-datatable-in.html

But is there similar method available in CSOM as there in SSOM?

1 Answer 1


There is no similar method in CSOM (C#). You have to build manually as like your reference.

You can check the methods of ListItemCollection from MSDN

  • Thanks Atish. I thought there will be something similar available which will help me. I will wait if someone else comes with some other idea, otherwise will accept your answer.
    – P S
    Commented Jul 26, 2016 at 11:18
  • As Atish said , CSOM does not support GetDataTable() method on ListItemCollection.you have use caml query to get list collection and store the collection value in data row by Iterate through the loop.
    – Sabitha S
    Commented Jul 26, 2016 at 12:09
  • Its not CSOM and won't return a Collection, but a REST call to the /items endpoint of a List will get you all in a JSON structure Commented Jul 26, 2016 at 12:14
  • CSOM (C#) returns a collection. public class ListItemCollection : ClientObjectCollection<ListItem>. Doesn't it? Commented Jul 26, 2016 at 12:24

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.