Is there a way to make a WebCombo appear just as a normal asp:dropdownlist? I want the editable feature, where someone can type their own value, but still have it display like a standard asp dropdownlist.
You need to set:
Regards,
Andres
Hello,
I'm not sure if you have gotten it working yet but here is the solution to make it look like a dropdownlist
public void InstantiateIn(System.Web.UI.Control container) { Infragistics.WebUI.UltraWebGrid.CellItem cellitem1 = ((Infragistics.WebUI.UltraWebGrid.CellItem)(container)); WebCombo combo = new WebCombo(); cellitem1.Controls.Add(combo); //Set data source
//Set the webcombo to be editable
combo.Editable = true; combo.Width = Unit.Pixel(100); combo.DropDownLayout.DropdownWidth = Unit.Pixel(104); combo.DropDownLayout.DropdownHeight = Unit.Pixel(70); combo.DropDownLayout.ColHeadersVisible = Infragistics.WebUI.UltraWebGrid.ShowMarginInfo.No; combo.DropDownLayout.RowSelectors = Infragistics.WebUI.UltraWebGrid.RowSelectors.No; }
All you need to do is use these 5 lines of code
combo.Width = Unit.Pixel(100); combo.DropDownLayout.DropdownWidth = Unit.Pixel(104); combo.DropDownLayout.DropdownHeight = Unit.Pixel(70); combo.DropDownLayout.ColHeadersVisible = Infragistics.WebUI.UltraWebGrid.ShowMarginInfo.No; combo.DropDownLayout.RowSelectors = Infragistics.WebUI.UltraWebGrid.RowSelectors.No;
To set the combo to be editable:
combo.Editable = true;
Hope that helps,
HS2
I am using above code. But it displays nothing. When will InstantiateIn() function called?