Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1150
WebDropDown - static items and DataBind
posted

I think I discovered some misbehavior in WebDropDown (v 2009.1). 

When I set dropdown items statically (through markup or programmatically by not using datasource) and when I call DataBind() on my page/usercontrol, then those items will be thrown away. But it should maintain those items, because I don't want to set items dynamically in this case. 

.NET own DropDownList control provides a property AppendDataBoundItems for similar cases. 

  • 24671
    posted

    Hi,

    When you call DataBind() items are cleared. If you don't add anything or don't have a DataSource set, nothing will be created or bind in terms of items. This is the correct behavior. Currently the WebDropDown doesn't support the AppendDataBoundItems properly, but this can be easily achieved by a couple of lines of code behind. Please let me know if you would like me to create a sample for you.

    Thanks very much for your feedback,

    Angel

    (P.S: by the way this forum is actually for WebCombo - another IG control, not for the WebDropDown)