In WebCombo , you can set the ColumnType to many types.
This topic will show you how to customize several ColumnTypes.
To customize ColumnType to text
- Right-click on the WebCombo instance and select WebCombo Designer.
- Choose QuickStart - Column and Rows and select
one of the column.
- Set ColumnType to Text.
- Run the project.
To utilize ColumnType to image
- Right-click on the WebCombo instance and select WebCombo Designer.
- Choose QuickStart - Column and Rows and select
one of the column.
- Set ColumnType to Image.
- In WebCombo's InitializeRow events, put the following code:
private void WebCombo1_InitializeRow(object sender, ISNet.WebUI.WebCombo.RowEventArgs e)
{
e.Row.Cells.GetNamedItem("Column1").Image = "Images/" + e.Row.Cells.GetNamedItem("FirstName").Text + ".jpg";
e.Row.Cells.GetNamedItem("Column1").CustomObjectAttributes = "height=20px width=10px";
}
|
- Run the project.
To utilize ColumnType to ImageAndText
- Right-click on the WebCombo instance and select WebCombo Designer.
- Choose QuickStart - Column and Rows and select
one of the column.
- Set ColumnType to ImageAndText.
- Set CellImage to any image file. For example: "Images/customer.gif".
- Run the project.
To utilize ColumnType to Custom
- Right-click on the WebCombo instance and select WebCombo Designer.
- On the QuickStart - Column and Rows and select
one of the column.
- Set ColumnType to Custom.
- Run the project.