Hi,
Does anyone know how to do a client side resort of the WebDataGrid?
Thank Yoou,
Tracy
Hi Tracy,
This should be fairly easy to accomplish. Just use the following code.
var grid = $find("WebDataGrid1");
var sorting = grid.get_behaviors().get_sorting();
var col = grid.get_columns().get_column(0);
sorting.sortColumn(col, 1, true); // first param is col object, second is sort direction (0-none, 1- asc, 2-desc) and last param is whether to clear other columns' sortings
sorting.applySort();
Let us know if you have any other trouble.
regards,David Young
I have a problem. The thing is that suppose if we sort a column and if I want to display the data in grid as it was there before (the sorting of column) in a button's client side click then how can I achieve it? Is it possible? If so how?
Thanks & regards,
Assyst