Hi,
I am new to Telerik RadControl suite (2013 Q1) and testing RadGrid control. I am surprised to find that sorting on client side on Radgrid is not that simple. In some post it is mentioned that I have to do this:
call the web service/page method/ URL that provides your data when you need to sort. RadGrid then expects the sorted data to be returned in the response. If you need to simulate this approach entirely on the client-side, you can hook to the client-side OnCommand event, check for the Sort command, cancel the command to prevent default behavior, sort the data programmatically with javascript and pass the sorted result back to the grid using RadGrid.get_masterTableView().set_dataSource().
If we are going with server side:
I have to code in RadGrid1_SortCommand event and rebind the grid. Our requirement has that we use templated column with textboxes and let user enter data. At any point of time, user can sort. Say suppose I have 10 rows, user entered values into text boxes of 2 rows. Then he clicked on some column header text. How do we retain text box values if we rebind the grid. Does it automatically uses viewstate to set back templated column with textboxes and value.
If anyone has any examples, please let me know.
Thanks,
Prathiba.
I am new to Telerik RadControl suite (2013 Q1) and testing RadGrid control. I am surprised to find that sorting on client side on Radgrid is not that simple. In some post it is mentioned that I have to do this:
call the web service/page method/ URL that provides your data when you need to sort. RadGrid then expects the sorted data to be returned in the response. If you need to simulate this approach entirely on the client-side, you can hook to the client-side OnCommand event, check for the Sort command, cancel the command to prevent default behavior, sort the data programmatically with javascript and pass the sorted result back to the grid using RadGrid.get_masterTableView().set_dataSource().
If we are going with server side:
I have to code in RadGrid1_SortCommand event and rebind the grid. Our requirement has that we use templated column with textboxes and let user enter data. At any point of time, user can sort. Say suppose I have 10 rows, user entered values into text boxes of 2 rows. Then he clicked on some column header text. How do we retain text box values if we rebind the grid. Does it automatically uses viewstate to set back templated column with textboxes and value.
If anyone has any examples, please let me know.
Thanks,
Prathiba.