Hi Guiseppe,
Your requirement can be achieved by using QueryCellInfo client side event. This event will be triggered for every cell in TreeGrid, and you can set the HTML attribute for the cells within this event. Please refer the following code snippet.
|
<ej:TreeGrid runat="server" ID="TreeGrid" IdMapping="Id" ParentIdMapping="ParentId" QueryCellInfo="queryCellInfo"
//..
</ej:TreeGrid>
<script type="text/javascript">
function queryCellInfo(args) {
if (args.cellValue == 10)
$(args.cellElement).attr('custom', 'test');
}
</script> |
You can also distinguish between the header cell and data cell with the element’s class name, for the header cell the class name is “e-headercell” and for the data cell the class name will be
“e-rowcell”.
Please let us know if you require further assistance on this.
Regards,
Punniyamoorthi