This is a migrated thread and some comments may be shown as answers.

Wrong keys on Client-Side binding help

1 Answer 54 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Enrico Foschi
Top achievements
Rank 2
Enrico Foschi asked on 17 Dec 2008, 02:48 PM
Hi all,

just to report a mistake in the help page:
http://www.telerik.com/help/aspnet-ajax/client-side-binding.html -

in the middle of the page, you say:

To optimize even more the grid client-side data binding you can get both data and total items count in a single request. Example:
... 
[WebMethod(EnableSession = true)] 
public Dictionary<string, object> GetDataAndCount(int startRowIndex, int maximumRows, List<GridSortExpression> sortExpression, List<GridFilterExpression> filterExpression) 
   Dictionary<string, object> data = new Dictionary<string, object>(); 
   data.Add("data", GetData(startRowIndex, maximumRows, sortExpression, filterExpression)); 
   data.Add("count", (int)Session["Count"]); 
   return data; 
... 

But actually the key "data" and "count" should be "Data" and "Count", otherwise they won't be recognized. The JSON output you may trace here (http://demos.telerik.com/TelerikCompressionModule/) proof this.

Thanks,
Enrico Foschi


1 Answer, 1 is accepted

Sort by
0
Sebastian
Telerik team
answered on 20 Dec 2008, 09:23 AM
Hello Enrico,

Thank you for the remark - it is right on target! The keys you specified will be updated for the next version of the documentation. I updated your Telerik points for the feedback.

Best regards,
Sebastian
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Grid
Asked by
Enrico Foschi
Top achievements
Rank 2
Answers by
Sebastian
Telerik team
Share this question
or