views:

17

answers:

0

I have derived my own class ControlStateDropDownList which extends DropDownList. As its name suggests, its purpose is to use the ControlState instead of the ViewState to store the SelectedIndex. AutoPostBack is set to true.

This is a requirement because this derived DropDownList needs to be inside an ASPxGridView column, and the ASPxGridView has its ViewState disabled, so the DropDownList will have it disabled too and won't be able to store its SelectedIndex. The ASPxGridView is inside an UpdatePanel and I'm registering the DropDownList with the ScriptManager by calling RegisterPostBackControl.

So far so good. However, the SelectedIndexChanged event is never fired. So I overrode LoadPostData and RaisePostDataChangedEvent and inside these methods just call the base's methods.

LoadPostData is returning true when the SelectedIndex changes between PostBacks (so SaveControlState and LoadControlState are working correctly). But RaisePostDataChangedEvent does not get called, so SelectedIndexChanged neither.

My current solution is to make the call to RaisePostDataChangedEvent inside of LoadPostData when the base returns true.

What could be the source of this behavior?