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

Number format without group separators

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

1 Reply

SS Seeni Sakthi Kumar Seeni Raj Syncfusion Team 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. 


Loader.
Live Chat Icon For mobile
Up arrow icon