Hi,
I have a radgrid, and I would like to display both text and image on the header. So I used following code to add a image to each of columns. But only last column displays both text and image, other columns still not display image.
I have a radgrid, and I would like to display both text and image on the header. So I used following code to add a image to each of columns. But only last column displays both text and image, other columns still not display image.
protected void RadGrid_ItemDataBound(object sender, GridItemEventArgs e) {if (e.Item is GridHeaderItem) { GridHeaderItem headerItem = (GridHeaderItem)e.Item; HashSet<string> columnNames = (HashSet<string>)ViewState["Columns"]; foreach (string columnName in columnNames) { Image image = new Image();Could some one help me with displaying both text and image for each of the columns? Thanks very much.
image.ImageUrl = columnName + ".png"; headerItem[columnName].Controls.Add(image); } } }