Hi TaeWook Kang,
Query: However, if a number does not exist in a
decimal point, I want to express it as an integer.
We achieved your requirement by using the queryCellInfo event of
the treegrid. This event allows you to customize the cells of the TreeGrid by
providing a callback function that is executed for each cell.
Please refer to the below code snippet,
<ejs-treegrid id="TreeGrid" dataSource="ViewBag.dataSource"......
queryCellInfo="queryCellInfo">
<e-treegrid-columns>
………..
<e-treegrid-column field="price" headerText="Price" format="n5"></e-treegrid-column>
</e-treegrid-columns>
</ejs-treegrid>
…………
<script>
queryCellInfo(args) {
if (args.column.field == 'price' && Number.isInteger(args.data.price)) {
args.cell.innerText = args.data.price.toString();
}
}
</script>
|
Please refer to the below screenshot,

Please refer to the below API documentation
https://ej2.syncfusion.com/documentation/api/treegrid/#querycellinfo
Regards,
Pon selva
If this post is helpful, please consider
Accepting it as the solution so that other members can locate it more quickly