Thread ID: |
Created: |
Updated: |
Platform: |
Replies: |
145287 | Jun 15,2019 09:28 PM UTC | Dec 9,2019 11:06 AM UTC | Vue | 5 |
![]() |
Tags: Data Grid |
groupSettings: {
captionTemplate:
"<div><strong>${key}</strong> ${if(count === 1)}<span>${count} record</span>${else}<span>${count} Records</span> ${/if}</div>",
columns: ["CustomerID"]
} |
groupSettings: {
captionTemplate:
"${if(field === 'Freight')} $ ${/if}${key} ${if(count === 1)} ${count} record ${else} ${count} Records ${/if}",
columns: ["Freight"]
} |
export default {
data() {
return {
data: data,
currencySymbol: {
"USD": "$",
"EUR": "€"
},
groupSettings: {
columns: ["Freight"]
}
};
},
methods: {
// Grid’s load event function
onLoad() {
// Get the currency code
var currencyCode = this.$refs.grid.ej2Instances.currencyCode;
// Define the captionTemplate based on the currency code
this.$refs.grid.ej2Instances.groupModule.groupSettings.captionTemplate = "${if(field === 'Freight')}" + this.currencySymbol[currencyCode] + "${/if}${key} ${if(count === 1)} ${count} record ${else} ${count} Records ${/if}";
}
}
} |
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.
This page will automatically be redirected to the sign-in page in 10 seconds.