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

Number format without group separators

Thread ID:

Created:

Updated:

Platform:

Replies:

129466 Mar 20,2017 04:15 PM UTC Mar 22,2017 12:39 PM UTC JavaScript 1
loading
Tags: ejGrid
Stefano Enrico
Asked On March 20, 2017 04:15 PM UTC

Hi,

i have a grid where i want to display number without group separators. I use {0:n2} format

http://jsplayground.syncfusion.com/Sync_qmyrx2ec

how can I do?

Thanks
Stefano

Seeni Sakthi Kumar Seeni Raj [Syncfusion]
Replied On March 22, 2017 12:39 PM UTC

Hi Stefano,  
 
We could see you would like to remove the group separator. This can be achieved using the queryCellInfo event of the Grid. In this event, we will format the respective cells as shown in the following code example.  
 
<script type="text/javascript"> 
    $(function () { 
        $("#Grid").ejGrid({ 
            dataSource: window.details, 
            columns: [ 
                     { field: "Number", textAlign: ej.TextAlign.Right, width: 110 }, 
                     { field: "Currency", format: "{0:c2}", textAlign: ej.TextAlign.Right, width: 110 }, 
                     { field: "Date", format: "{0:MM/dd/yyyy}", textAlign: ej.TextAlign.Right, width: 110 } 
            ], 
            queryCellInfo: function (args) { 
                if (args.column.field == "Number") 
                    $(args.cell).text(Number(args.data.Number).toFixed(2)); 
            } 
        }); 
    }); 
</script> 
 
Refer to the following API Reference and sample demo. 
 
 
Regards,  
Seeni Sakthi Kumar S. 


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

;