Problem with OnItemCreated and InitializePager being called four times
I'm hoping someone here can shed some light on this problem or suggest
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
Thanks for any thoughts you can share on the subject.
|All times are GMT. The time now is 01:58 AM.|
Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.