M
Mark Olbert
It appears that FormView controls require the >>exact<< same layout of controls and control types in the various templates in order
to function properly. Failure to do so results in a "failure to load ViewState" exception when a mode change occurs.
Is this correct?
If so, it would appear to defeat the >>entire point<< of being able to use customized templates for the various modes.
Assuming this limitation exists, what's the workaround? For example, in my current application, I have various lookup fields that
can only take on certain values. I want those to display as Labels in ReadOnly mode, and as DropDownLists in Edit and Insert mode.
Do I have to override the LoadViewState method for the page and map the control values back and forth? Or just jettison ViewState
for the FormView and rebind the control on every postback?
As an aside, I did not see any mention of this limitation in the docs. It should have been mentioned in screaming dayglo orange 18
point type.
- Mark
to function properly. Failure to do so results in a "failure to load ViewState" exception when a mode change occurs.
Is this correct?
If so, it would appear to defeat the >>entire point<< of being able to use customized templates for the various modes.
Assuming this limitation exists, what's the workaround? For example, in my current application, I have various lookup fields that
can only take on certain values. I want those to display as Labels in ReadOnly mode, and as DropDownLists in Edit and Insert mode.
Do I have to override the LoadViewState method for the page and map the control values back and forth? Or just jettison ViewState
for the FormView and rebind the control on every postback?
As an aside, I did not see any mention of this limitation in the docs. It should have been mentioned in screaming dayglo orange 18
point type.
- Mark