We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

GDBG - Is there a way to dynamically change MappingName & style of cell?

Thread ID:

Created:

Updated:

Platform:

Replies:

14839 Jun 6,2004 09:34 PM UTC Jun 7,2004 05:14 AM UTC WinForms 1
loading
Tags: GridControl
Lori S. Pearsall
Asked On June 6, 2004 09:34 PM UTC

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!

Administrator [Syncfusion]
Replied On June 7, 2004 05:14 AM UTC

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.

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;