BoldSignEasily embed eSignatures in your .NET applications. Free sandbox with native SDK available.
Query |
Syncfusion Comment | |
1. I set data format for column to show 0 decimal place, but I want some rows in those column to show 1 decimal place. Please see my attached image. For example, I want the numbers in last row of my treegrid to show 1 decimal place(such as in JAN column, I want to it display -65.0), but other rows to show 0 decimal place. |
We can achieve these queries Using “QueryCellInfo” client side event. Find the code snippet below,
| |
2. How can we add some characters to the data in treegrid. For example, in my attached image, I want the data in the last row have '%' character, such as in column JAN, -65 should display as -65%. For the data in other rows, I'd like them to be displayed as $9,000. | ||
3. I'd like to change the font color based on the data value. For example, in my attached image, I want those negative numbers to display in red color. How can we do that? | ||
4. Can we hide the value 0 if the data value is 0? in other words, if the data value is 0, I want that cell be empty without displaying anything. |
@(Html.EJ().TreeGrid("Tree") .ChildMapping("Children") .TreeColumnIndex(1) .ClientSideEvents(eve => { eve.QueryCellInfo("query"); }) )
<script type="text/javascript"> function query(args) { if (!isNaN(args.cellValue) && args.column.field != "TaskId") args.cellElement.innerHTML =parseInt(args.cellValue).toFixed(2) + "%"; } |