Hi All.
I have several questions about custom databinding. First - about this sample: http://es.infragistics.com/products/aspnet/sample/data-grid/custom-databinding-paging-collection if I understand correctly on every page change custom result set is generated an bound to the grid - and not entire grid but only current page, correct? If so - do we still have to handle PageIndexChanged event? And mainly - how does the grid know in advance how many page links to display in the pager if it's not bound to full data set?
Secondly, how to I implement custom databinding in WHDG? I don't see this event in the event selection. It would really sucks if it's not supported in WHDG, if so - is there any hack to enable it? After all GridView of WHDG is the same plain WebDataGrid.
Thanks!
Hello ygalanter,
To handle or not “PageIndexChanged” event depends on your scenario and custom implementation - http://help.infragistics.com/NetAdvantage/ASPNET/2012.1/CLR4.0/?page=Infragistics4.Web.v12.1~Infragistics.Web.UI.GridControls.WebDataGrid~PageIndexChanged_EV.html
Regarding your second question - in the sample mentioned there is a method called “Count” that returns number of records available in the Data Source.
In “CustomDataBinding” event this count is provided to “TotalRowCount” property of grid select arguments. Notice also that grid page size is set to 12 in page code. In this way the grid “knows” how many records are available in the Data Source.
For “WebHierarchicalDataGrid” there is similar option - “ContainerGridDataBinding” event - http://help.infragistics.com/NetAdvantage/ASPNET/2012.1/CLR4.0/?page=Infragistics4.Web.v12.1~Infragistics.Web.UI.GridControls.WebHierarchicalDataGrid~ContainerGridDataBinding_EV.html
Note that the new Data Source applied should be hierarchical.
If you need further clarifications let me know.