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
60
How to disable paging in WebHierarchicalDataGrid
posted

I've got paging enabled at design time with WebHierarchicalDataGrid. My boss wants a LinkButton that will allow the user enable/disable paging at runtime. Here's my code that isn't working...

Paging paging = grid1.Behaviors.Paging;
if (grid1.Behaviors.Paging.Enabled)
{
    paging.Enabled = false;               
}
else
{
    paging.Enabled = true;               
}
grid1.RefreshBehaviors();      

When I disable paging in this way, all the the items do, indeed, show up in the grid in one long page, but the problem is the page numbers still appear in the bottom of the grid. I expected them to go away. They didn't. They're still clickable, giving the user the little finger icon indicating that there are multiple pages of this size in the grid (which there aren't). Clicking those links does nothing (except confuse the user).

Then when I try to re-enable paging in this way, I get not one, but two sets of Quickpages at the bottom of the grid - one on the left and one on the right, neither of which work. Then when I try to close the browser window, I get an error message saying a delegate is missing.

Clearly this isn't the way to enable/disable paging at runtime. How is this done?

Eric

 

Parents
No Data
Reply
  • 33839
    posted

    Hi Eric,

    Disabling the behavior should have been sufficient.  I do recall fixing a bug related to this somewhat recently.  It is possible that in the latest Service Release, your expected behavior would work now.

    regards,
    David Young 

Children
No Data