I'm using grid that looks like that:
Html.Telerik().Grid(Model).Name("preciousGrid").
... bla bla bla..
.ClientEvents(events => events.OnDataBinding("onDataBinding"))
.Columns(columns =>
{
columns.Bound(o => o.Date);
columns.Bound(o => o.Name);
Yes, I'm totally ignoring .DataBinding
stuff to use custom ajax call. Why? I need to send to the server more data, rather than a simple id. And the only way to gather that data is by traversing DOM elements. So, none of the methods suggested by Telerik wouldn't work in my case.
Everything works - in onDataBinding, after the necessary data gathered and sent to the server, server returns results, grid displays that data.
But still there is a problem. Paging doesn't work. And the footer shows something like that:
Any ideas?
UPD: Oh... maybe I should send to the server paging info and return results based on that? How to do that? Can you show me a sample?
UPD2: GridCommand command doesn't send Paging info to the server by default(if I omit it in $.ajax and still put a GridCommand parameter in the action method it would send something to the controller, but PageSize is always equals 10 (default value), and Page is always 1. So I guess I have to hardcodedly include these values in $.ajax. But I don't know how can I get PageSize and Page values on the client?