I have a datasource that is coming form an Excel Spreadsheet that has a number column formatted as text. I would like the grid to format the column as 1,333,456 with no decimal and still have the column have the ability to sort as it was a number. Is this possible?
// Grid’s queryCellInfo event handler
onQueryCellInfo: function (args) {
// Check if the event is triggered for the required column
if (args.column.field === "Freight") {
// Convert the ‘Freight’ column value to number format and assign it to the row data
args.data.Freight = parseInt(args.data.Freight);
}
} |
I totally appreciate your reply and your code but how would I get the converted integer to show with comma separated 1000's? No dollar sign just 1,123,456 and no decimals
Not sure why -- but my app started putting in the comma after I put in format = "N" but your sample does not have the comma. strange
<e-column field="Freight" type="number" format="N”></e-column> |