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. Image for the cookie policy date
close icon

GGC : SummaryRows : Format problem / Cultureinfo

Hello all,

I have following problem using SummaryRows in a GridGroupingControl. Global CultureInfo of application is set to nl-BE. It works great. All decimals are shown in this format : "1.000,35". Thousend separator = . and decimal seperator = ,
EXCEPT for the summaryrows. These values are outputted like this "1.000.35" thousend and decimal values are points.

I use this code now to try and change behaviour :

gridGroupingControl.TableDescriptor.QueryCellStyleInfo +=new GridTableCellStyleInfoEventHandler(TableDescriptor_QueryCellStyleInfo);
void TableDescriptor_QueryCellStyleInfo(object sender, GridTableCellStyleInfoEventArgs e)
{
if (e.TableCellIdentity.TableCellType == GridTableCellType.SummaryFieldCell)
{
double val;
e.Style.CultureInfo = new System.Globalization.CultureInfo("nl-BE");
Double.TryParse((string)e.Style.CellValue, NumberStyles.AllowDecimalPoint, e.Style.CultureInfo, out val);
String sval = string.Format(GlobalData.CultureInfo, "{0:N}", val);
String s = "Total : " + sval;
e.Style.Text = s;


}
}


if I debug the String is correct ! Decimal is a komma. But the output is false. It seems that the suncfusion library replaces all komma's into points before showing ?





4 Replies

HA haneefm Syncfusion Team January 29, 2008 08:45 PM UTC

Hi Gert,

Here is a forum thread that discuss with similar issue. Please try this and let me know if this helps.
http://www.syncfusion.com/support/forums/message.aspx?&MessageID=43961

Best regards,
Haneef



AS Asterinex January 30, 2008 09:02 AM UTC

Hi Haneef,

thx for your reply. Yes that is the thread I got my information from. The demo file in that thread works correct.
But in my application all summary values are wrongly formatted. No koma's at all. All other values in the grid are displayed ok.
Please look at the screenshots. In debug everything is formatted fine. But the final display is wrong. Is seems that the grid is replacing all komma's by points before displaying.









Screenshot.zip


AS Asterinex January 30, 2008 12:55 PM UTC

I have found the problem. The comma is there but is cutt-off. Therefore the comma looks like a point. Is there a way to increase cellgheight or to center the amounts horizontally so that komma's are shown ? Or any other solution ?




>Hi Haneef,

thx for your reply. Yes that is the thread I got my information from. The demo file in that thread works correct.
But in my application all summary values are wrongly formatted. No koma's at all. All other values in the grid are displayed ok.
Please look at the screenshots. In debug everything is formatted fine. But the final display is wrong. Is seems that the grid is replacing all komma's by points before displaying.









Screenshot.zip



HA haneefm Syncfusion Team January 30, 2008 08:10 PM UTC

Hi Gert,

You can increase the height of the summary row by using the below code:

this.gridGroupingControl1.TableOptions.SummaryRowHeight = 30;

let me know if this helps.

Best regards,
Haneef


Loader.
Live Chat Icon For mobile
Up arrow icon