Hi Koen,
Greetings from Syncfusion support.
You can directly provide the € before the InvoiceAmount to showcase the value. Also, you can convert the long dates to date by using the custom helper function in the template. Kindly refer the below code,
|
<ejs-combobox id="customers" query="new ej.data.Query().from('Employees').select(['FirstName', 'BirthDate', 'EmployeeID']).take(6)" placeholder="Select a customer" popupHeight="200px"
itemTemplate= "@Html.Raw("<span class='name'>€${FirstName}- ${customHelper(data)}</span>")" >
<e-combobox-fields value="FirstName"></e-combobox-fields>
<e-data-manager url="https://services.odata.org/V4/Northwind/Northwind.svc/" adaptor="ODataV4Adaptor" crossDomain="true"></e-data-manager>
</ejs-combobox> |
|
customHelper = function (args) {
var getDOMString = ej.base.compile('<span>${upperCase(BirthDate)}</span>', customHelperFunc);
let opElem = getDOMString(args);
var element = document.createElement('span');
element.appendChild(opElem[0]);
return element.innerHTML;
}
var customHelperFunc = {
upperCase: function upperCase(str) {
return new Date(str).toLocaleDateString();
}
}; |
In the above code, the BirthDate fields return as the date object. We passed the date value to the new date and get the dateValue from the object on its own using the LocaleDateString method.
Regards,
Sevvandhi N