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 =
wddField.DataBind()
tbCell =
New HtmlTableCell
tbCell.Controls.Add(wddField)
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
What do I need to import into the .vb page at the top to be able to reference it as just WebDropDown. Maybe that is my problem.
Hello Irri, Were you able to get this working? Please let me know if you have questions regarding this.
Ok I'm sorry it's not working. It's compiling which is better. I have this code and it tells me null reference error on the data bind.
wddField = New WebDropDownwddField.ID = row(strTable & "FieldID")wddField.DataSource = objCommon.ReturnListItems("LookupList", row("ListType"))wddField.TextField = "ItemName"wddField.ValueField = "ItemName"wddField.DataBind()tbCell = New HtmlTableCelltbCell.Controls.Add(wddField)
Hello,
What is row defined as and also what about objCommon?
You can remove the line wddField.DataBind() to see if it will run without errors and will display the list on the dropdown.
Let me know if this works for you.
Sincerely,Duane HoytDeveloper Support EngineerInfragisticshttp://ko.infragistics.com/support
This is working now, but you-know-who only knows what changed. I was off yesterday so maybe the computer had a chance to rest? :)
One more followup question. I have these inside a web tab, is there a way to make the drop down popup over the edges of the tab instead of staying within the tab edges and a scroll bar showing up? A regular html drop down just goes right over the edges.
Are you able to change the width of the Web Tab?
Let me know if you have any questions with this matter.
I got around this by setting EnableDropDownAsChild to false.