Another ability offered by WebCombo is that you can create multiple columns unbound combo using PopulateUnboundData method.
This topic will show you how to perform the above scenario.
To create multiple column's unbound WebCombo using PopulateUnboundData method
- Drag WebCombo instance from ToolBox to WebForm.
- In Page_Load event handler, add the following code:
C# Copy Code WebCombo1.DataMember = "Customers"; WebCombo1.DataTextField = "ContactName"; WebCombo1.DataValueField = "CustomerID"; WebCombo1.LayoutSettings.ComboMode = Mode.MultipleColumns; WebCombo1.LayoutSettings.StatusBoxVisible = false; WebCombo1.Columns.Add("ContactName"); WebCombo1.Columns.Add("Address"); WebCombo1.Columns.Add("CustomerID"); dsNorthwind.CustomersDataTable dt = new dsNorthwind.CustomersDataTable(); dsNorthwindTableAdapters.CustomersTableAdapter da = new dsNorthwindTableAdapters.CustomersTableAdapter(); da.Fill(dt); WebCombo1.PopulateUnboundData(dt, false);
- Run the project.
Tasks
How-to: Create unbound WebCombo using PopupateUnboundData method
How-to: Perform batch update in unbound WebCombo
How-to: Delete a row in unbound WebCombo
How-to: Modify the first cell of the first row in unbound WebCombo
How-to: Set selected row in unbound WebCombo
How-to: Add item in unbound WebCombo from client side
Concepts
Unbound Mode
References
PopulateUnboundData Method