Hello
I have a webgrid that uses LoadOnDemand(xml) and Paging (also xml). When a page link is pressed, the "loading" cursor is shown, but after a while the new page is not displayed - I still see page 1. The grid is bound at runtime to a hierarchical dataset (two tables). By the way, loading on demand the second band's rows do work.
What could be wrong?
Private m_objDS As New DS_MyTypedDataSetPrivate m_strConnectionString As String
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load m_strConnectionString = "Data Source=MyServer; Initial Catalog=MyDB;User ID=sa; Password=xyz;"
UltraWebGrid1.DisplayLayout.Pager.AllowPaging = True UltraWebGrid1.DisplayLayout.Pager.PageSize = 20
LoadDataSet()
UltraWebGrid1.DataSource = m_objDS UltraWebGrid1.DataBind()
End Sub
Thanks a lot.
Hi EMoscosoCam !!!!
Just make sure that you are not missing this out !!!
EnableInternalRowsManagement = True
Thierry,
Thanks for getting me to look in the right area.
In addition, I had to set the RowsRange property to the PageSize I wanted. Basically, the control wasn't retrieving enough rows to fill the grid. Rather odd.
this.wg.DisplayLayout.Pager.PageSize = 500;
this.wg.DisplayLayout.RowsRange = 500;
hi,
I had some issues, can't remember if they were similar to yours, but my solution was to set the page size in InitializeDataSource event.
{
UltraWebGrid1.DisplayLayout.Pager.PageSize = 12;
}
EMosocosoCam,
This may be way off base, but it is a problem I have noted in a different fashion - sort of...
I found that if I set the PageSize property to something larger than the default (50 records) than the number of visible rows was still 50 records. That is, if I set the PageSize to 500, than I would see one page of 50 records. Very annoying. But, even more annoying, the page index selector (you are using links, I used the combo box option) would respect my coded PageSize and give me the option to pick a page of records based on 500 records per page. Thus, I would not see the 450 records between the end of page 1 - that is the 50 records displayed - and the beginning of page 2. Likewise with further pages.
Even more annoying, my testing data was not as large as the production data.
I reverted back to the defaults. I kinda want the larger settings because the app in question is on a fast intranet so the bandwidth would support the data. Also, the customer routinely deals with datatables in the area of a 100 records and the requirement to page induces some error rate.
Maybe setting the PageSize property to less than default (20 rather than 50) confuses the control as well. Try using the default and check if the expected data presents. If so, request a bit more help on this site - I wuold like a solution. If not, well it was an idea, eh...
This may be an order of event issue. Try filling your typed data set in the page init event. This page init should fire before anything else and your data should be available by the time you get to you InitializeDataSource event.