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 : November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Altering data displayed

Thread ID:

Created:

Updated:

Platform:

Replies:

16117 Jul 6,2004 03:17 PM UTC Jul 6,2004 04:24 PM UTC WinForms 1
loading
Tags: GridControl
Lee Perkins
Asked On July 6, 2004 03:17 PM UTC

I''ve got a GridDataBoundGrid with its DataSource set to a custom collection and using GridBoundColumn''s to map properties of the objects in the collection to columns in the grid. I want to alter the way a particular column is displayed. The column is bound to a numeric property, and I want to do some processing with that number and actually display text I provide in the column instead of the number. Modifying the class for the objects in the collection to provide a property for the text I want is not a possibility. I looked at the Grid.DrawCellDisplayText event. I can get the text about to be displayed in the cell and can change it by setting e.DisplayText, but I can''t figure out how to tell what column is being displayed so I don''t know whether or not to modify the text. I looked at the Grid.DrawCell event. I can get the Column/Row index for the cell being drawn (e.ColIndex and e.RowIndex), and can probably use that to get to a particular object in the collection to get the value of the numeric property in question, but I can''t figure out how to change the text displayed. Can anyone provide any suggestions or solutions, or just a point in the right direction? Thanks! ----- Lee

Administrator [Syncfusion]
Replied On July 6, 2004 04:24 PM UTC

In DrawCellDisplayText, maybe you can check e.Style.CellIdentity.Colindex to find out where you are? Or, you might try handling grid.Model.QueryFormattedText and format things there.

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

;