Hi,
I'm trying to programmatically set the paging behavior for my WHDG in code. I've used the CreateBehavior to create a paging behavior and then set my Paging behavior to enabled and set its page size, but despite setting these, there is no pager on the grid.
If I set the behavior via HTML it works fine, but through code it doesn't appear to work at all. I'm doing this on the Page_load before the datasource is tied to the grid. Also if I set the behavior in HTML and leave out the pagesize in the html and attempt to set it in the code behind, it just defaults to 8 per page, regardless of what I set.
Anyone run across this before or have a work around?
Hi,After you change the PageSize behavior in code, just call RefreshBehaviors() method off of the WHDG, and the PageSize should refresh.
Thanks,Olga
Olga,
Thanks for the help, that did succeed in causing the pagesize to change. But I've run across another issue, for some reason it causes my template controls to not find their Resource File's (Resx) text, removing the refresh behavior returns the text to the controls, but having it in causes it to disappear
Pearson.