In WebCombo, you can set the ColumnType to many types.
This topic will show you how to utilize ColumnType to image.
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:
C# Copy 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.