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
20
Hierarchical Webdatagrid Custom Paging Template
posted

I have been having problems referencing controls in the WebHierarchicalDataGrid when using Custom Template Paging. I want to do the same thing with the Hierarchicalwebdatagrid as in the custom paging example for the webdatagrid. 

To reproduce the error simple edit the webdatagrid example and change the <ig:webdatagrid tags to <ig:WebHierarchicalDataGrid

This will error with Object reference not set to an instance of an object

Line 21:         pagerControl = WebDataGridView.Behaviors.Paging.PagerTemplateContainer.FindControl("CustomerPager") as WebFeatureBrowser_WebDataGrid_Paging_CustomerPagerControl;
Line 22:         pagerControl.PageChanged += new EventHandler<PageChangedEventArgs>(currentPageControl_PageChanged);

The FindControl method cannot find the CustomerPager control. if I debug this I can see that the control count in the footer template is 0.

I also found that PagerTemplateContainer.was deprecated and in my examples was replaces with PagerTemplateContainerBottom

Greg