I have a sharepoint layouts/application aspx page with RADControls, ASP .Net Control and ListFieldIterator added dynamically.
ListFieldIterator added dynamically as its at the bottom half of the page which needs to display fields of a certain list based on the selection made in the controls at the top of the page.
On inital load it works well, loads all the controls and display an existing item from list based on business logic
When we change a radio button at the top of the page this will do a postback and then render the ListFieldIterator, it does not display all fields/controls . i.e. Only newly added control in list field iterator is displayed when radio button is changed.
Initially had View state error
This is the message when I make ViewState False
Failed to load viewstate. The control tree into which viewstate is being loaded must match the control tree that was used to save viewstate during the previous request. For example, when adding controls dynamically, the controls added during
a post-back must match the type and position of the controls added during the initial request.
Now gone as page tree structure is same after postback with the help of SESSION variable in the PAGE INIT
Even after loading FieldIterator with same controls in page init with the help of session variable as prior to postback and afterwards changing to the new set of fields in page load doesn't work properly.
i.e.
When we change a radio button at the top of the page this will do a postback and then render the ListFieldIterator, it does not display all fields/controls . i.e. Only newly added control in list field iterator is displayed when radio button is changed.
Thanks