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.

GGC : SummaryRows : Format problem / Cultureinfo

Thread ID:

Created:

Updated:

Platform:

Replies:

71371 Jan 29,2008 03:39 AM Jan 30,2008 03:10 PM Windows Forms 4
loading
Tags: GridControl
Asterinex
Asked On January 29, 2008 03:39 AM

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 ?





haneefm [Syncfusion]
Replied On January 29, 2008 03:45 PM

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


Asterinex
Replied On January 30, 2008 04:02 AM

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

Asterinex
Replied On January 30, 2008 07:55 AM

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


haneefm [Syncfusion]
Replied On January 30, 2008 03:10 PM

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


CONFIRMATION

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.

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.

;