Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
161
Custom Paging and ObjectContainerDataSource
posted

Hi, I am new to infragistic I am trying to implement objectcontainerdatasource(MVP) with ultrawebgrid. The data that I am showing on the grid comes from a method that gives only 5 datarow at each call and has following signature 

IList<businessentity> Method(int PageIndex,ref int TotalRecords).

 So this method take page number and return me collection of business entity object with the total records into the database.Now I am getting data back and show pagecount as ultrawebgrid1.displaylayout.pager.pagecount = (int) TotalRecords/5 +1 . Since PageSize is 5. I handle Pageindexchange event each time someone clicks on pager and I get requested pagenumber from the (PageIndexChangeEventArgs e) e.NewPageIndex 

Now my problem is when I call the method from pageindexchange event data is return to codebehind (that I can see in debugging) but data is not showing on grid at all.I did try enableviewstate=false but It is not working. I use ultrawebgrid1.databind() to check and see but it looks this show me some outofbound exception

 can some one show me link where this type of custom paging is availble with objectdatasource ???

Thanks in advance

Parents
  • 28464
    posted

    Hello,

    Thanks for your interest in our products. I recently played with ObjectContainerDataSource in a WCSF projectwith UltraWebGrid and found that it worked fine (with the minor exception of one small bug in design time). However, I used only the declarative syntax and the grid was bound through its DataSourceID property.

    Is there any chance that you are binding in some other way? For example, are you using the InitializeDataSource event of the grid for binding? Or for example, can you drop a standard built-in asp:GridView component side-by-side with UltraWebGrid and see if you are able to bind it correctly?

    Any additional information will be helpful and will certanly provide additional clues.

Reply Children
No Data