TreeGrid Cell color
Thanks for using Syncfusion products.
We would like to let you know that, we can set background color for each cell of the TreeGrid with the help of “queryCellInfo” client side event. Here we have enabled background color for some cells by comparing the cell values of “Progress1” and “Progress2” columns. Please refer the below code snippets for more details.
| //... <div ej-treegrid e-datasource="data" e-selectedrowindex="selectedRow" e-treecolumnindex="1" e-columns="columns" e-childmapping="subtasks" e-querycellinfo="querycellinfo" e-enablevirtualization="true" id="treegrid"> function querycellinfo(args) { if (args.column.field == "progress1") { if (args.data.progress1 > args.data.progress2) { args.cellElement.bgColor = "#F8071F"; } } |
We have also prepared the sample based on this. Please find the sample in the below location.
Sample: https://jsplayground.syncfusion.com/p2u54nvr
Please let us know if you require further assistance on this.
Regards,
John R
Hi Ruzic,
Thanks for the update.
Please let us know if you need further assistance on this.
Regards,
Mahalakshmi K.
Hi Ruzic,
At present there is no support for fix on column in TreeGrid. Hence we have logged and implemented the feature regarding this. A support incident has been created under your account to track the status of this requirement. Please log on to our support website to check for further updates.
https://www.syncfusion.com/account/login?ReturnUrl=/support/directtrac/incidents
Please let us know if you require further assistance on this.
Regards,
Mahalakshmi K.
Hi Ruzic,
Query 1 : is there a way how to limit the width of columns??
Solution : We can set width for every individual column using “width” property. We request you to check the width of tree grid container, if we set width property for all columns then the container width should be lesser or equal to the sum of the all columns width, if it is greater than that, then the container width equally distributed to the all columns in the tree grid.
Query 2 : Also the textAlign doesn´t work in treeGrid.
Solution : In ejTreeGrid we can set text alignment for all the columns except for treecolumn using textAlign column property, text alignment of tree column always be in left side, but we can change the header text alignment of treecolumn using “headerTextAlignment” property.
We have prepared a sample based on above queries, find the sample link from below,
Sample Link : https://jsplayground.syncfusion.com/weo4xk03
Please let us know, if you need further assistance on this.
Regards,
Dinesh kumar.N
Hi Ruzic,
Thanks for your update.
Please let us know, if you need further assistance on this.
Regards,
Dinesh kumar.N
- 9 Replies
- 4 Participants
-
RI RI
- Dec 1, 2015 03:45 PM UTC
- Dec 16, 2015 12:30 PM UTC