Hi,
I got a grid which is created in code-behind and where ViewState is disabled. The grid has a pager. My problem is that the grid does not keep its state and therefore the entry of the pager is reset to the standard entry.
Is there a possibility to use a pager in such a scenario?
Here is my code for the grid:
Thanks for your help.
Best regards
Ferdinand
I got a grid which is created in code-behind and where ViewState is disabled. The grid has a pager. My problem is that the grid does not keep its state and therefore the entry of the pager is reset to the standard entry.
Is there a possibility to use a pager in such a scenario?
Here is my code for the grid:
private void setGridProperties(RadGrid grid) |
{ |
grid.ID = "rgTreeList"; |
grid.EnableViewState = false; |
grid.AutoGenerateColumns = false; |
grid.AllowSorting = true; |
grid.AllowPaging = true; |
grid.AllowMultiRowSelection = true; |
grid.AllowFilteringByColumn = false; |
grid.GridLines = GridLines.None; |
grid.Width = Unit.Percentage(100); |
grid.HeaderStyle.Width = Unit.Pixel(150); |
grid.AllowMultiRowSelection = true; |
grid.MasterTableView.PagerStyle.Mode = GridPagerMode.NextPrevNumericAndAdvanced; |
grid.ClientSettings.EnableRowHoverStyle = true; |
grid.ClientSettings.Selecting.AllowRowSelect = true; |
grid.ClientSettings.Scrolling.AllowScroll = true; |
grid.ClientSettings.Scrolling.UseStaticHeaders = true; |
grid.ClientSettings.Scrolling.SaveScrollPosition = true; |
grid.ClientSettings.Resizing.AllowColumnResize = true; |
grid.ClientSettings.Resizing.ClipCellContentOnResize = false; |
grid.ClientSettings.Resizing.EnableRealTimeResize = true; |
grid.ClientSettings.Resizing.ResizeGridOnColumnResize = true; |
grid.MasterTableView.DataKeyNames = new string[] { "E_ID" }; |
grid.MasterTableView.OverrideDataSourceControlSorting = true; |
grid.MasterTableView.PageSize = 15; |
grid.GroupingSettings.CaseSensitive = false; |
grid.MasterTableView.PagerStyle.Width = 1000; |
grid.MasterTableView.OverrideDataSourceControlSorting = true; |
grid.MasterTableView.EnableColumnsViewState = false; |
} |
Thanks for your help.
Best regards
Ferdinand