Hi,
I have a grid with Pager.MinimumPagesForDisplay=2
Initially, the grid has no record. So, the pager would not appear.
After that, I call invokeXmlHttpRequest from javascript to refresh the grid with records more than the Pager.PageSize value. The problem is that the Pager row (that shows the page number) doesn't appear after that.
Please advise and thanks in advance.
Hi JerryPhoon,
I have tested this scenario and as you describe the pager is not shown after the http request. This seems to be due to the design of the control.
I would suggest that you set the MinimumPagesForDisplay property to 1. If needed you can style the paging element in order to not show the page number (which in case of no records will be one) using:
igtbl_getElementById("UltraWebGrid1_pager").style.color = "LightGrey"
Please note that the UltraWebGrid control is now outdated and as of .NetAdvantage 2011 Volume 2 is no longer included in our product package. I would suggest that you consider switching to the WebDataGrid/WebHieararchicalDataGrid. More information regarding these controls is available at:
http://help.infragistics.com/NetAdvantage/ASPNET/2011.2/CLR4.0/?page=Web_WebDataGrid_WebDataGrid.html
Additional samples demonstrating the features of these grids can be found at:http://samples.infragistics.com/aspnet/
Please let me know if this helps.
Best Regards,
Petar IvanovDeveloper Support EngineerInfragistics, Inc.http://es.infragistics.com/support
Thanks for the reply. I'd look into that.
About the WebDataGrid:
i) Does it perform faster than the UltraWebGrid?
ii) Can I hide and display the pager easily via javascript?
Hi Jerry,
Thank you for your reply.
Regarding hiding and displaying the pager using BLOCKED SCRIPT you can use the following code to hide/display the pager div in WebDataGrid:
$find("WebDataGrid1").get_behaviors().get_paging().get_bottomPagerElement().hidden = true;
Please note that this only hides the pager, enabling/disabling the paging behavior can be done server side. Attached is a small sample page illustrating your scenario using WebDataGrid.
The WebDataGrid should in any situation perform better than the UltraWebGrid. You can see some performance metrics regarding the WebDataGrid (among other controls) at:
http://es.infragistics.com/innovations/performance-whitepapers.aspx#PerformanceWhitepapers
Please let me know if you have any questions.
Thank you very much.
Please feel free to contact me if you have any further questions regarding this matter.