They code for converting the SPListItemCollection datas to datatable using c#
SPWeb oWebsite = SPContext.Current.Web;
SPList oList = oWebsite.Lists["CustomListName"];
SPListItemCollection collListItems = oList.Items;
DataTable dt=new DataTable();
dt = collListItems.GetDataTable();
SPWeb oWebsite = SPContext.Current.Web;
SPList oList = oWebsite.Lists["CustomListName"];
SPListItemCollection collListItems = oList.Items;
DataTable dt=new DataTable();
dt = collListItems.GetDataTable();
No comments:
Post a Comment