![]() |
Problem with OnItemCreated and InitializePager being called four times
Hello,
I'm hoping someone here can shed some light on this problem or suggest alternate approaches. I'm creating a custom datagrid by extending the standard one. In it I'm putting additional stuff in the pager section. My code will work by overriding either OnItemCreated or InitializePager, but both of those are called 4 times per page load. It's called twice between "Begin LoadViewState" and "End LoadViewState" and then twice between "Begin Raise PostBackEvents" and "End Raise PostBackEvents". The end result is only one set of my changes appears on the grid. I can only assume that the two calls are one for the top pager and one for the bottom pager, even when the top pager is not enabled. During the first two calls my CurrentPageIndex is the old number and then during the last two calls my CurrentPageIndex is the new number. My question is is there any way to tell from within the overridden method which call is for which pager (ie. top or bottom if that's what is happening) and if it's being called during the LoadViewState or PostBackEvents? Thanks for any thoughts you can share on the subject. Regards, --Bernal |
| All times are GMT. The time now is 05:46 PM. |
Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.