I''m trying to save some screen real estate. I have a "Type" column that can be either Text or Image. Based on the chosen value, I''d like to have a second column that either shows the text (it''s rich text) or shows the image. Both the rich text and image data are in the datasource of the grid.
Thanks in advance!
ADAdministrator Syncfusion Team June 7, 2004 12:14 AM
One way to do this is to handle either PrepareViewStyleInfo of Model.QueryCellInfo. In your handler, check e.RowIndex and e.ColIndex and whatever else you have to check to decide what to show. Then set the properties of e.Style acordingly. For text, you could set e.Style.CellType = "TextBox" and set e.Style.Text to the value you want to see. For Image, you might have this set as the default for the column so youwould not have to do anything in the event to just show an image cell.