I am creating a grid on the back end and adding it to a RadDock, but I want the columns to be sortable on the client side.
It looks like it is working here for a hard-coded grid
http://demos.telerik.com/aspnet-ajax/grid/examples/client/clientsideevents/defaultcs.aspx
However, whenever I click on my column header it does a postback (which doesn't work for me).
I am just binding to a static DataTable and the grid is non-editable.
The on column click and double click events do work, but don't seem to do any sorting, I am using the javascript from the link above.
Also, I am setting this up on load, in case that matters (it is dynamic because it is based on what is Posted to the page).
Is there some property I need to add or other control involved?
Thanks
It looks like it is working here for a hard-coded grid
http://demos.telerik.com/aspnet-ajax/grid/examples/client/clientsideevents/defaultcs.aspx
However, whenever I click on my column header it does a postback (which doesn't work for me).
I am just binding to a static DataTable and the grid is non-editable.
| RadGrid grid = new RadGrid(); |
| grid.ID = "RadGrid1"; |
| grid.AllowSorting = true; |
| grid.AllowPaging = true; |
| grid.PageSize = 5; |
| grid.ClientSettings.ReorderColumnsOnClient = true; |
| grid.ClientSettings.EnableRowHoverStyle = true; |
| grid.ClientSettings.ClientEvents.OnColumnClick = "ColumnClick"; |
| grid.ClientSettings.ClientEvents.OnColumnClick = "ColumnDblClick"; |
| grid.DataSource = srts.DefaultView; // srts is the DataTable |
| grid.DataBind(); |
| dock.ContentContainer.Controls.Add(grid); |
Also, I am setting this up on load, in case that matters (it is dynamic because it is based on what is Posted to the page).
Is there some property I need to add or other control involved?
Thanks