Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
40
Paging & Sorting - Deserialization error
posted

Hi, I'm trying to use the WebDataGrid to sort and page data from a SharePoint list in a web part. So far it works in the sense that it shows me the first page of data, resizing columns, and row selection all work OK. But when I try to add sorting or paging it will give me a popup alert saying:

Deserialization failure: Invalid response.

I retrieve the list data via a caml query in code and save the results as a SPListItemCollection and convert that into a DataTable in order to bind it to the WebDataGrid.

I have tried Googling and searching these forums high and low and found no answer.

I am relatively new to SharePoint and this is my first time using Infragistics.

Parents
  • 12679
    posted

    Hello Zyin,

     

    Thanks for posting in the community.  I can only guess what could be the cause of this issue, thus my first guess is that you probably not setting the datasource on each postback.  Please note that the Sorting and the Pagging operations are server side implemented,  it means that when you trigger them through the UI  the grid issues ajax calls to the server and expects datasource  to be assigned on the server.

    Can you try this code please:

    1. protected void Page_Load(object sender, EventArgs e)
    2. {
    3.     this.WebDataTree1.Load += new EventHandler(WebDataTree1_Load);
    4. }
    5.  
    6. void WebDataTree1_Load(object sender, EventArgs e)
    7. {
    8.     this.WebDataGrid1.DataSource = GetDataSource();
    9. }
Reply Children