I have created five new coluns on my Gantt grid, with the following code:
<script type="text/x-jsrender" id="columnTemplate">
<div style='height:20px;width:20px;margin:auto; background-repeat:no-repeat;'>{{:#data['my_field']}}</div>
</script>
function load(args) {
var columns = this.getColumns();
columns.splice(9, 0,
{
field: "my_field",
headerText: "my_field_text",
columnTemplate: true,
templateId: "columnTemplate",
width: "120px"
});
}
.ClientSideEvents(options =>
{
options.Load("load");
})
It's everything ok on the grid. It displays values from my new column, but when I try to edit a task the label for the new fields shows as undefined, and the textfield is empty with no value.
When I try to add a task the labels shows undefined too (image attached).
What can I do to show the label correctly and load the values when editing?
Thanks,
Otto Machado.
Attachment:
Gantt_c20606a1.zip