$("#TreeGridContainer").ejTreeGrid({
treeColumnIndex: 1,
//…
columns: [
{ field: "taskID", headerText: "Task Id" },
{field: "taskName", headerText: "Task Name" },
{ field: "startDate", headerText: "Start Date", editType: "datepicker", format: "{0:M/dd/yyyy}" },
{ field: "endDate", headerText: "End Date", editType: "datepicker", format: "{0:M/dd/yyyy}" },
{ field: "priority", headerText: "Priority", isTemplateColumn: true, templateID: "customColumnTemplate" },
{ field: "progress", headerText: "Progress", editType: "numericedit"},
] |
[template]
<script type="text/x-jsrender" id="customColumnTemplate">
<div style='height:20px;' unselectable='on'>
{{if hasChildRecords}}<div class='intend' style='height:1px; float:left; width:{{:level*20}}px; display:inline-block;'></div>
{{else !hasChildRecords}}
<div class='intend' style='height:1px; float:left; width:{{:(level)*20}}px; display:inline-block;'></div>
{{/if}}
<div class='{{if expanded}}e-treegridexpand e-icon {{else hasChildRecords}}e-treegridcollapse e-icon {{/if}} {{if level===4}}e-doc{{/if}}' style='height:20px;width:30px;margin:auto;float:left;margin-left:10px;
style=' float left;display:inline-block; unselectable='on'></div>
<div class='e-cell' style='display:inline-block;width:100%' unselectable='on'>{{:#data['priority']}}</div>
</div>
</script> |
Hi,
Worked! Thanks for your help!
Regards,
Daniela.