According to the documentation the OnRowSelected client event fires after the row is selected. There is a defect becuase when you call the rebind() method on the grid inside of this client side function the currently selected row (client side) is not reflected server-side.
The work around is to use the OnRowClick event instead. When calling the rebind() on the grid inside this client side function the currently selected row is properly reflected server-side.
Thanks,
Joey
The work around is to use the OnRowClick event instead. When calling the rebind() on the grid inside this client side function the currently selected row is properly reflected server-side.
| function onUserSelected(sender, eventArgs) { |
| var mTable = sender.get_masterTableView(); |
| mTable.rebind(); // after this is called check the server-side needs data source event and the row currently selected client-side is not what is reflected server-side |
| } |
| ... |
| <telerik:RadGrid ID="UsersGroupsGrid" runat="server" OnNeedDataSource="UsersGroupsGrid_NeedDataSource"> |
| <ClientSettings EnableRowHoverStyle="True"> |
| <Selecting AllowRowSelect="True" /> |
| <ClientEvents OnRowSelected="onUserSelected" /> |
| </ClientSettings> |
| </telerik:RadGrid> |
Thanks,
Joey