igCombo
Namespace: Wisej.Web.Ext.Ignite
Assembly: Wisej.Web.Ext.Ignite (4.1.0.0)
The igCombo is a full-featured combo box control.
- C#
- VB.NET
public class igCombo : igBase
Public Class igCombo
Inherits igBase
Constructors
igCombo()
Constructs a new instance of the igCombo class.
Example:
The following example creates a combo box and configures it through the Options object.
var combo = new igCombo();
combo.Options.dataSource = countries;
combo.Options.valueKey = "Code";
combo.Options.textKey = "Name";
combo.Options.placeHolder = "Select a country";
combo.Size = new Size(250, 30);
this.Controls.Add(combo);
igCombo(options)
Constructs a new instance of the igCombo class using the specified options.
| Name | Type | Description |
|---|---|---|
| options | Object | Initial set of options passed to the igCombo widget: an anonymous object, a JSON string or a dynamic object. |
Example:
The following example creates a combo box that allows the selection of multiple items and reads the selected values from the widget.
var combo = new igCombo(new
{
dataSource = new[]
{
new { Code = "IT", Name = "Italy" },
new { Code = "US", Name = "United States" }
},
valueKey = "Code",
textKey = "Name",
multiSelection = new { enabled = true, showCheckboxes = true }
});
this.Controls.Add(combo);
// later, i.e. in a button click handler.
var selected = await combo.Instance.valueAsync();