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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Grouping in Numeric and Currency Columns

Thread ID:

Created:

Updated:

Platform:

Replies:

122147 Feb 20,2016 12:03 PM UTC Feb 22,2016 12:59 PM UTC WPF 3
loading
Tags: SfDataGrid
Amit Saraf
Asked On February 20, 2016 12:03 PM UTC

I have added GridNumericColumn & GridCurrencyColumn in SfDataGrid Control Binding them to decimal data type of column in datatable

I want to show values grouped as 1,23,45,678.00 but values are show as 12345678.00 

How to achive this

Thanks in advance

Sivakumar R [Syncfusion]
Replied On February 20, 2016 02:29 PM UTC

Hi Amit,

You can achieve your requirement by setting GridNumericColumn.NumberGroupSizes  and GridCurrencyColum.CurrencyGroupSizes properties. Find the code snippet below,

<Syncfusion:GridNumericColumn NumberGroupSeparator="," MappingName="EmployeeSalary">

    <Syncfusion:GridNumericColumn.NumberGroupSizes>

        <Int32Collection>3,2,2,0</Int32Collection>

    </Syncfusion:GridNumericColumn.NumberGroupSizes>
</Syncfusion:GridNumericColumn>


Documentation:
http://help.syncfusion.com/wpf/sfdatagrid/column-types#gridcurrencycolumn
http://help.syncfusion.com/wpf/sfdatagrid/column-types#gridnumericcolumn

Refer below msdn link to understand about setting GroupSizes.
https://msdn.microsoft.com/DA-DK/library/windows/apps/xaml/system.globalization.numberformatinfo.numbergroupsizes

Please let us know if you have any queries.

Thanks,
Sivakumar

Amit Saraf
Replied On February 22, 2016 06:32 AM UTC

Hi Amit,

You can achieve your requirement by setting GridNumericColumn.NumberGroupSizes  and GridCurrencyColum.CurrencyGroupSizes properties. Find the code snippet below,

<Syncfusion:GridNumericColumn NumberGroupSeparator="," MappingName="EmployeeSalary">

    <Syncfusion:GridNumericColumn.NumberGroupSizes>

        <Int32Collection>3,2,2,0</Int32Collection>

    </Syncfusion:GridNumericColumn.NumberGroupSizes>
</Syncfusion:GridNumericColumn>


Documentation:
http://help.syncfusion.com/wpf/sfdatagrid/column-types#gridcurrencycolumn
http://help.syncfusion.com/wpf/sfdatagrid/column-types#gridnumericcolumn

Refer below msdn link to understand about setting GroupSizes.
https://msdn.microsoft.com/DA-DK/library/windows/apps/xaml/system.globalization.numberformatinfo.numbergroupsizes

Please let us know if you have any queries.

Thanks,
Sivakumar


Thanks for your help

It worked and I got result as wanted.

Amit Saraf

Ashwini Paranthaman [Syncfusion]
Replied On February 22, 2016 12:59 PM UTC

Hi Amit,
Thank you for the update.
Please let us know if you need any other assistance.
Regards,
Ashwini P.

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.

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

;