I have a RadGrid with a detail table which I want to page if there are enough data. The main table must also allow paging as well.
I saw how detail tables' data are cleared when the main grid is rebound. That makes sense, so I checked whether we're coming from the detail table before setting the main's data source:
Unfortunately, when DetailTableDataBind is raised, my current page index is always zero, defined by
I saw how detail tables' data are cleared when the main grid is rebound. That makes sense, so I checked whether we're coming from the detail table before setting the main's data source:
protected void grdGroupings_NeedDataSource(object source, GridNeedDataSourceEventArgs e){ if (!e.IsFromDetailTable) { grdGroupings.DataSource = AppealGroupingService.Find(null, grdGroupings.CurrentPageIndex + 1, grdGroupings.PageSize); }}Unfortunately, when DetailTableDataBind is raised, my current page index is always zero, defined by
grdGroupings.MasterTableView.DetailTables[0].CurrentPageIndexEven though the DetailTable's pager moves to highlight #2 (or whatever I hit), CurrentPageIndex is always zero, so I request, receive and display the first chunk of information from my service, regardless of what's highlighted in the pager.
What's the right way to have a detail table hang onto its index for paging?
Thanks,
Scott