Hi,
I am using Paging in UltraWebGrid in my pages.
While sorting, only the page that is displayed is sorted.
Can anyone please tell me how to do sorting (the sorting should happen for all the pages not just for the displayed page)?
Thanks,
Kala
Hi Sarita Nanda,
I have implement this solution and working. but InitializeRow event is calling for every rows even rows are not on that selected page.
How can I avoid this?
Muhammad Yousuf
I am facing same problem
actually i implement the pagging and sorting on database side and also i am using check box in every row and also a check box in header to check all , but after that while i am sorting again a server error is there?
Don't know how i can solve it
Hi Kala,
I think the DataBinding of the Grid is affecting the behavior. I would suggest to handle the InitializeDataSource event of the grid and provide the DataSource there and also handle the InitializeLayout and provide all the Paging criteria there. Here is an example:
protected void UltraWebGrid1_InitializeDataSource(object sender, Infragistics.WebUI.UltraWebGrid.UltraGridEventArgs e) { this.UltraWebGrid1.DataSource = this.GetDataTable(); }
protected void UltraWebGrid1_InitializeLayout(object sender, Infragistics.WebUI.UltraWebGrid.LayoutEventArgs e) { this.UltraWebGrid1.Browser = BrowserLevel.Xml; e.Layout.LoadOnDemand = LoadOnDemand.Xml;
e.Layout.AllowSortingDefault = Infragistics.WebUI.UltraWebGrid.AllowSorting.Yes;
//This is for Paging
e.Layout.Pager.AllowPaging = true; e.Layout.Pager.PageSize = 10;
e.Layout..Pager.StyleMode = PagerStyleMode.QuickPages;
e.Layout..Pager.QuickPages = 4;
e.Layout.Pager.PrevText = "Previous Page "; e.Layout.Pager.NextText = " Next Page"; }
If you are handling PageIndexChanged or SortColumn events, then I would recommend not to DataBind the Grid in any of them.
Please modify the application and let me know how it works.
Sarita
Hi Sarita,
I tried that. Looks like it's not one simple setting like this. Now, if I sort, the page numbers get disappeared.
Hello Kala,
I'm not sure if you are using AJAX or not. If yes, then please set the DisplayLayout.AllowSortingDefault = AllowSorting.Yes. This will do the sorting on the server. If this doesn't help, then please provide me the detail description about the application and how are you defining the paging and sorting with the version of the software used.