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=
AD
Administrator
Syncfusion Team
August 15, 2003 04:48 AM UTC
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. ???
PL
Paul Laudeman
August 2, 2004 11:45 AM UTC
Is using the QueryCellFormattedText event still the best way to handle this as of Sycnfusion v2.0.x?
Thanks,
-Paul
AD
Administrator
Syncfusion Team
August 2, 2004 01:47 PM UTC
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.