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
265
Webcombo DataBind Issue (Columns get repeated on postbacks)
posted

I am setting datasource for a webcombo on page_Init coz we are loading controls dynamically on the form.

    Dim ddl As Infragistics.WebUI.WebCombo.WebCombo = New Infragistics.WebUI.WebCombo.WebCombo
                ddl.ID = String.Format("ddl{0}", row("IdWorkItemField").ToString)
                ddl.DataValueField = "IdWorkItemListBox"
                ddl.DataTextField = "TxListValue"
                ddl.EnableXmlHTTP = True

                ddl.DataSource = GetAllowedValues(DirectCast(row("IdWorkItemField"), Integer))
                AddHandler ddl.InitializeLayout, AddressOf ddl_InitializeLayout
                AddHandler ddl.InitializeDataSource, AddressOf ddl_InitializeDS
                AddHandler ddl.SelectedRowChanged, AddressOf DDL_SelectedRowChanged
                ddl.DataBind()

               ddl.value = GetDefaultValue(DirectCast(row("IdWorkItemField"), Integer)) '(To set the value ddl needs to be loads thats why we do ddl.DataBind on the above line)

We are using Infragistics2.WebUI.WebCombo.v9.1, Version=9.1.20091.1015

 

First time it loads fine. but any postback causes columns to duplicate (Not Rows.. just columns with empty values).

What am I doing wrong? I narrowed it down to ddl.DataBind method, If I skip that line in debugger on postbacks then columns don't get repeated). What can I do to fix the problem?