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.
Hello Zyin,
Thanks for the follow-up. It was just a fake code to show a possible implementation. It's nice to hear you overcame this issue.
Best regards,
We found a temporary solution to this problem. We were getting the errors when putting the web part into an application page in SharePoint. But if I put the web part is put onto a Web Part Page it works without the deserialization errors.
I tried to implement your suggested solution and the method GetDataSource() is undefined. Know that in our code the data source is being assigned every time there is paging, sorting, page load, postback, or item deletion. For now putting it into a Web Part Page is acceptable for us, but it would still be nice to be able to put it anywhere we want.
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: