Default behavior of the RadGrid sorting triggers a postback action , while I am using the same Grid in RadDock ( Loaded Dynamically ) causes the dynamic contents flushes out. is there any possibilities to sort / filter the RadGrid in client side , so that i can avoid postback ?
10 Answers, 1 is accepted
The RadGrid control does not provide sorting and filtering on the client-side. A postback is needed in order for the respective action to occur.
For your scenario I would suggest to place the grid in an AjaxPanel and then add this ajax panel to the dock. This way Ajax request, instead of postback, will occur.
the Telerik team
And to me it seems the proposed solution is totally weird.
Client-side sorting should be as easy as doing ClientSort="true" or something along these lines.
It has nothing to do with "Ajax requests", "AjaxPanels", postbacks, etc...
It seems you are hitting nails with a screwdriver.
That's why the client-side filtering/sorting/paging is not possible.
the Telerik team
You are right stating that client-sorting is not applicable for ~10,000 records.
I understand it fully, but I have scenarios where I have only ~100 records, and I load them all at once.
In this scenario, client-sorting makes total sense.
It's more-or-less minor issue though, I can live without that.
Is there a way to do some type of client-side caching do achieve a sort without a postback? I'm having a similar scenario where I load up a radgrid on client-side and wish to sort without a postback.
RadGrid needs to rebind to show the new data. It is a data bound control that uses sorting capabilities of the data sources to do the sorting. You will see this in the examples with client-side binding that sorting is happening on client side(without post-back): http://demos.telerik.com/aspnet-ajax/grid/examples/client/declarativedatabinding/defaultcs.aspx.
However the service is still called and I believe you want to avoid that.
It is possible to sort it entirely on the client, but such functionality is not provided out of the box and you will need to write it yourself. You will probably need an object that holds the data after calling to the service. Then you will need to bind the grid to this object and when you need to sort it, sort this object without calling the service.
Here is some very basic example for sorting the grid entirely on the client:
I hope this helps.
the Telerik team
It is not contrary, this forum thread is 4-5 years old and there have been more than 12 newer versions of the controls since then.
Currently you can use the ClientDataSource to effectively perform client side binding operations and also the grid supports virtualization for both server and client side binding.
Ok, I'm using version Q3 2014; but, could potentially upgrade to the latest version, if needed. Does RadGrid allow for filtering and sorting on the client-side; where, I would only load my RadGrid once, then filter and sort without having to go back to the server? If so, would ClientDataSource do the job?
You may use the RadClientDataSource for filtering and sorting client side. Here is example demo that shows integration of ClientDataSource and RadGrid. The filtering, sorting and paging happens entirely in the browser in the demo. Please see the markup and code of the demo, and if you have further questions, let us know.