I have a RadGrid where the data source is set programmatically because the data source will change based on the option the user selects. Some data sources have more columns than the others. When I have the edit item panel displayed to insert a new record I am removing a text box and adding a drop down in its place and populating the drop down from the database and selecting the value that was in the textbox. I can get this to display but when I click the insert button the page blows up because when the page gets to the init event it wants to bind the old one. any advice on how I can get around this?
here is a ajax error that I get every time I try and do an insert/update
Sys.WebForms.PageRequestManagerServerErrorException: 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.