This documentation explains about how to set different currency format for grid columns and its summary value.
By default, the format property formats the value based on culture set to the Grid. For currency formats, currency depends upon the culture and hence by default we cannot show different currencies for multiple columns in same grid with a culture set. You can use following solution to show different currency formats for multiple column.
We can achieve this requirement by using queryCellInfo and load event of the grid. In queryCellInfo event we have changed the format of the particular column values by using ej.format method. We have created the helper functions in Grid load event and used that helper functions in the Grid summaryTemplate to change the format of the summaryValues.
Note: We need to refer the respective culture script files to the sample to get the respective format.
1. Render the Grid control with the querCellInfo event and load event.
2. Changing the format of the grid column values
3. Creating the helper functions
4. Using the created helper functions in summary template.
We have used same queryCellInfo event to change the particular column values format in angular. But in summaryValue, we have used angular custom pipes in ng-template to achieve this requirement.
1. Render the Grid control with the querCellInfo event.
2. Changing the format of the grid column values.
3. Creating the angular custom pipe.
4. using the created custom pipe in ng-template.
The following screenshot describes the above behavior:
This page will automatically be redirected to the sign-in page in 10 seconds.