Binding Datagrid with SPList

To be honest, I was struggling a bit to bind the SPList with the datagrid... and found the way to do so.


  1. This ia two years late. But, thanks for the usefull tip. One thing I relealized, is that you require elivated privileges to do this (atleast in my applicaiton).

    List = new SPSite(list.ParentWeb.Site.ID).AllWebs[list.ParentWeb.ID].Lists[list.ID];

    this.dgvList.DataSource = List.Items.GetDataTable();

    Shrini Viswanathan


Post a Comment