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

Very slow grid paint after switching to "Currency" cell type

Thread ID:





51519 Nov 7,2006 04:18 PM UTC Nov 8,2006 08:58 AM UTC Windows Forms 3
Tags: GridControl
Asked On November 7, 2006 04:18 PM UTC

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!

Administrator [Syncfusion]
Replied On 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,

Replied On November 8, 2006 07:46 AM UTC


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?

Administrator [Syncfusion]
Replied On November 8, 2006 08:58 AM UTC

Hi MikhaiM,

Please refer to the below forum thread for more details.

Best Regards,


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