Viewstate of a DropDownList is lost on postback using ComponentArt Dialog Control

As long time users of ComponentArt ASP.NET controls we're well aware of their shortcomings and the company's lack of enthusiasm about fixing bugs.

We've recently had a problem with populating data into a dropdown list that's inside a ComponentArt Dialog Control on the initial load of a page.

The dropdown list is populated but on subsequent postbacks the information is lost and viewstate errors may be seen. Here is the forum page where there are a lot of complaints but no viable solution.
http://www.componentart.com/community/forums/t/37374.aspx

This is really not acceptable because this is the kind of problem that really stops your development in its tracks. We do however have a simple solution.

The problem seems to be related to the control lifecycle internal to the ComponentArt controls.

You can resolve the issue by populating the dropdown list (or other problematic control) by overriding a different method.

OnLoad - fail
OnInit - fail
OnPreRender - works
OnLoadComplete - works

This correctly persists the items in the dropdown list control and also the users selection through postbacks.

Why not check out our network audit product using the ComponentArt controls?

Comments

Popular posts from this blog

Windows Server 2016, 2019, 2022, Windows 10 and Windows 11: Date and time "Some settings are managed by your organization".

TFTPD32 or TFTPD64 reports Bind error 10013 An attempt was made to access a socket in a way forbidden by its access permissions.

Enable function lock for F1-F12 on HP ZBook mobile workstations