Dear
i need to save settings for grid but in same time i have my paging
code :
i need to save settings for grid but in same time i have my paging
code :
public void CustomizedGridPagerSize(GridItemEventArgs e) { int allItemsCount = (e.Item as GridPagerItem).Paging.DataSourceCount; RadComboBox combo = (e.Item as GridPagerItem).FindControl("PageSizeComboBox") as RadComboBox; RadComboBoxItem item1 = new RadComboBoxItem("10", "10"); RadComboBoxItem item2 = new RadComboBoxItem("20", "20"); RadComboBoxItem item3 = new RadComboBoxItem("50", "50"); RadComboBoxItem item4 = new RadComboBoxItem("100", "100"); RadComboBoxItem item5 = new RadComboBoxItem("200", "200"); RadComboBoxItem item6 = new RadComboBoxItem("All", allItemsCount.ToString()); item1.Attributes.Add("ownerTableViewId", e.Item.OwnerTableView.ClientID); item2.Attributes.Add("ownerTableViewId", e.Item.OwnerTableView.ClientID); item3.Attributes.Add("ownerTableViewId", e.Item.OwnerTableView.ClientID); item4.Attributes.Add("ownerTableViewId", e.Item.OwnerTableView.ClientID); item5.Attributes.Add("ownerTableViewId", e.Item.OwnerTableView.ClientID); item6.Attributes.Add("ownerTableViewId", e.Item.OwnerTableView.ClientID); combo.Items.Clear(); combo.Items.Add(item1); combo.Items.Add(item2); combo.Items.Add(item3); combo.Items.Add(item4); combo.Items.Add(item5); combo.Items.Add(item6); combo.Items.FindItemByValue(((RadGrid)e.Item.OwnerTableView.Parent).PageSize.ToString()).Selected = true; }
if we use the default paging sizes then it is working well and we can load the grid settings,
but when we use the code above to increase the paging sizes then when we load the grid settings we found the pager not saved
Regards
AhmedSalem