ASP.NET ComboBox - Grid inside ComboBox



The items of the ComboBox can be customized using templates. You can embed any content inside an item template,
including HTML markup and ASP.NET server controls (any control from the Obout suite may be added to a template).

In order to set up an item template, use the ItemTemplate property of the ComboBox.
To extract data from the data item, use the Eval method which expects as a parameter
the name of the data field from which to load the data.

This example showcases the use of Grid control inside the ComboBox.
The end user is able to select a row from the Grid, which will be copied into the input field of the ComboBox.
To accomplish this layout, we used a single item in the ComboBox, with no value/text,
which is customized using an ItemTemplate to contain the Grid.



« Back to examples