Hi,
Does anyone know how to do a client side resort of the WebDataGrid?
Thank Yoou,
Tracy
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
Hello Tracy.
Let us know if you have further questions with this issue.
Regards,
Lyuba
Developer Support Engineer
Infragistics
www.infragistics.com/support
Hey Tracy,
Sorry for the confusion. Right now, this cannot be done with the WebDataGrid. It posts back to the server and has the DataSource sort the column if it can. Once client side binding is added to the Data Grid, this could be possible.
Dave
Hi David,
Thanks for the reply. but I fon't think that does what I want. Doesn't the applySort do a postback to the server? What I want to do is waht you can do with the UltraWebGrid:
var grid = igtbl_getGridById("UltraWebGrid1");
grid.sort();
THis resorts the grid on the client side without doing a postback. Is that possible?
Thanks,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