Hi,
Due to the nature of our application, we have to create controls dynamically, and move them from one parent to another during postbacks. This normally causes viewstate failed exceptions ("Failed to load viewstate. The control tree into which viewstate....") since control tree is modified during postbacks, however the issue is solved by using ViewStateModeById as suggested in another forum post.
This solution helped us all, except the RadMaskedTextBox control. Although we wrap it with ViewStateModeById attribute, it still causes viewstate failed exceptions when moved during postbacks. Below is how we wrapped it:
<ViewStateModeById()>
Public Class wrappedRadMaskedTextbox
Inherits Telerik.Web.UI.RadMaskedTextBox
End Class
The same method has been applied to many other controls, and they all worked fine including Telerik combobox, Telerik textbox (non mask input control) etc.
I really need help to solve this issue asap. If anyone can respond to this issue, that would be great. I also kindly ask you guys not to suggest me "disabling the viewstate" or "not dynamically creating or moving controls" since all those have valid reasons for our project. Also, regenerating the problem is fairly easy and straightforward.
Thanks in advance.
Due to the nature of our application, we have to create controls dynamically, and move them from one parent to another during postbacks. This normally causes viewstate failed exceptions ("Failed to load viewstate. The control tree into which viewstate....") since control tree is modified during postbacks, however the issue is solved by using ViewStateModeById as suggested in another forum post.
This solution helped us all, except the RadMaskedTextBox control. Although we wrap it with ViewStateModeById attribute, it still causes viewstate failed exceptions when moved during postbacks. Below is how we wrapped it:
<ViewStateModeById()>
Public Class wrappedRadMaskedTextbox
Inherits Telerik.Web.UI.RadMaskedTextBox
End Class
The same method has been applied to many other controls, and they all worked fine including Telerik combobox, Telerik textbox (non mask input control) etc.
I really need help to solve this issue asap. If anyone can respond to this issue, that would be great. I also kindly ask you guys not to suggest me "disabling the viewstate" or "not dynamically creating or moving controls" since all those have valid reasons for our project. Also, regenerating the problem is fairly easy and straightforward.
Thanks in advance.