Hi,
We are using Infragistics version 7.1 for our web application.
In the Ultra Web grid we are making use of the UltraWebNavBar control for paging and not the
default paging.
In our application we want to pass the page number as parameter. After filling the grid we have
to go directly to the specified page number.
The Code used is like below
Page_PreRender Event<<Fill The Grid from Dataset>>Grid1.DisplayLayout.Pager.CurrentPageIndex = <<Page number Parameter>>
Even after setting the Grid1.DisplayLayout.Pager.CurrentPageIndex property the page is not navigating properly to the correct page.
In the default paging method where the control displays the numeric page numbers in the bottom of the grid, this feature is working fine.
We need to do one extra submit for the form and then it works.
Please let me know if there is any way to avoid the extra postback and load directly the required page?
Thanks in Advance.
With Regards,
JG Giridhar.
Hello,
I think the order in which databinding is called and CurrentPageIndex is set is important - you will need to first set CurrentPageIndex and then databind. Example:
// Correct
UltraWebGrid1.DisplayLayout.Pager.CurrentPageIndex = 4; UltraWebGrid1.DataSourceID = "AccessDataSource1"; UltraWebGrid1.DataBind();
// Wrong UltraWebGrid1.DataSourceID = "AccessDataSource1"; UltraWebGrid1.DataBind(); UltraWebGrid1.DisplayLayout.Pager.CurrentPageIndex = 4;