Hello!
When I try to change needed cell type to "Currency" in OnQueryCellInfo,
...
if(currentColumn == CURRENCY)
{
style.CellType = "Currency";
}
...
grid repaints very slow. I have only one currency column and grid about 20x20 cells (1000x400 px), but full repaint takes about 300-500 msec. Without this changes it takes 120-150 msec only.
Thank you!
AD
Administrator
Syncfusion Team
November 8, 2006 04:32 AM UTC
Hi Mikhail,
You can use the standard textbox with text formating. Please refer to the Syncfusion\Essential Suite\Grid\Samples\Quick Start\TextFormat browser sample for formating the text in a cell. Here is a code snippet
grid.Model.ColStyles[colIndex].Format = "C";
grid.Model.ColStyles[colIndex].CellValue =1234.32;
grid.Model.ColStyles[colIndex].CellValueType = typeof(double);
Best Regards,
Haneef
MI
MikhailM
November 8, 2006 07:46 AM UTC
Hi!
It's really fast, but I can't apply MaskEdit and CurrencyEdit styles in this case.
Model.ColStyles[colIndex].TextAlign = GridTextAlign.Right;
Model.ColStyles[colIndex].MaskEdit.Mask = "9999999";
Model.ColStyles[colIndex].MaskEdit.PaddingCharacter = char.MinValue;
Model.ColStyles[colIndex].MaskEdit.PromptCharacter = char.MinValue;
Model.ColStyles[colIndex].MaskEdit.ClipMode = ClipModes.ExcludeLiterals;
Model.ColStyles[colIndex].MaskEdit.ThousandSeparator = char.MinValue;
Model.ColStyles[colIndex].CurrencyEdit.CurrencyDecimalDigits = 0;
Model.ColStyles[colIndex].CurrencyEdit.CurrencyNumberDigits = 7;
Model.ColStyles[colIndex].CurrencyEdit.CurrencySymbol = string.Empty;
Model.ColStyles[colIndex].CurrencyEdit.CurrencyGroupSeparator = string.Empty;
Model.ColStyles[colIndex].CurrencyEdit.NegativeSign = "-";
Model.ColStyles[colIndex].CurrencyEdit.NullString = string.Empty;
Model.ColStyles[colIndex].CurrencyEdit.NegativeColor = Color.Red;
Model.ColStyles[colIndex].CurrencyEdit.PositiveColor = Color.Red;
Model.ColStyles[colIndex].CurrencyEdit.CurrencyNegativePattern = 1;
Model.ColStyles[colIndex].CurrencyEdit.CurrencyPositivePattern = 0;
Model.ColStyles[colIndex].CurrencyEdit.ClipMode = CurrencyClipModes.ExcludeFormatting;
Does it mean that I can't use your solution?
AD
Administrator
Syncfusion Team
November 8, 2006 08:58 AM UTC
Hi MikhaiM,
Please refer to the below forum thread for more details.
http://www.syncfusion.com/support/Forums/message.aspx?&MessageID=6944
Best Regards,
Haneef