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

QueryCellFormattedText: what do I return?

Thread ID:





6525 Aug 14,2003 10:18 PM Aug 2,2004 09:47 AM Windows Forms 3
Tags: GridControl
Asked On August 14, 2003 10:18 PM

I'm presently using QueryCellFormattedText to set a cell whose type is formula to a currency format by: e.Text = string.Format("{0:p}", e.Value); is this the best approach? What's the difference between setting the following: 1)e.Text= 2)e.Style.Text= 3)e.Style.CellText=

Administrator [Syncfusion]
Replied On August 15, 2003 12:48 AM

In QueryCellFormattedText, setting e.Text is how you specify the formatted text you want displayed in the cell. In that event, if you set e.Style.Text expecting it to determine the formatted text in the cell, depending upon exactly what the cell type is and what the style.Format is, this may or may not determine the displayed text. There is no e.Style.CellText property. ???

Paul Laudeman
Replied On August 2, 2004 07:45 AM

Is using the QueryCellFormattedText event still the best way to handle this as of Sycnfusion v2.0.x? Thanks, -Paul

Administrator [Syncfusion]
Replied On August 2, 2004 09:47 AM

I think so, depending upon what you goals are. You could just set style.Format = "P", but this does not give you the flexibilitty of adjusting the value if your user has already ''made it'' a percentage (or whatever). The event allows you to dynamically format it depending upon whatever criteria you have at the particular instant the cell is being drawn.


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