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
1495
Creating webdropdown in code behind
posted

Using the following code, I get errers elsewhere in the code that makes no sense.  When  Icomment out what you see below, the project builds fine.  What the heck am I missing here?

 

Imports

 

Infragistics.Web.UI.ListControls

 

wddField =

New WebDropDown

wddField.ID = row(strTable &

"FieldID")

wddField.DataSource = objCommon.ReturnListItems(

"LookupList", "tatus")

wddField.TextField =

"ItemName"

wddField.ValueField =

"ItemName"

wddField.DataBind()

tbCell =

New HtmlTableCell

tbCell.Controls.Add(wddField)

Parents
No Data
Reply
  • 1765
    posted

    Hello Irri, I created a sample with Webdropdown in server side as given below but was unable to replicate the issue. We may have to look at your sample in order for us to provide solution. Appreciate if you could share a isolated sample with all the dependency files.

            ArrayList myAL = new ArrayList();
            myAL.Add("Hello");
            myAL.Add("World");

            WebDropDown wdd = new WebDropDown();
            wdd.ID = "WebDropDown1";          
            wdd.DataSource = myAL;
            wdd.TextField = "ItemName";
            wdd.ValueField = "ItemName";
            wdd.Width = 200;

            this.form1.Controls.Add(wdd);

    Thank you,

    Swetha

Children