Hi,
This Gantt in has Custom Field called "actualStart".
The default value of this field is null, but the view at this time want to blank rather than a "null" string.
Do you have any way?
actualStart: {
from:
"actualStart"
,
type:
"date"
,
defaultValue:
null
},
columns: [
{ field:
"title"
, title:
"title"
},
{ field:
"actualStart"
, title:
"actualStart"
, format:
"{0:d}"
},
],
thanks.
6 Answers, 1 is accepted
The only way to show a different value than the actual one at the moment is to bind to the dataBound event of the gantt and manually acess the cell element and change it's html:
http://docs.telerik.com/kendo-ui/api/javascript/ui/gantt#events-dataBound
Regards,
Bozhidar
Telerik
Hi Bozhidar,
I have the same problem and tried to resolve it using your advice, but unfortunatley I couldn't achieve it when having child tasks. If you check this example here (https://dojo.telerik.com/@bzpetkov/utIQAYAr/2), you'll see that the task2 contains a customColumn = "some", but its text is cleared as well. If you move task3 before task1, you won't have such problem. Could you please advise how to resolve this.
Thanks, Boyan.
This happens due to the DOM becoming out-of-sync with the virtual dom tree that the Gantt uses for rendering, after the manual change of the text element.
Unfortunately this is a side effect that cannot be circumvented with this workaround. What I can advise is to try and edit the data service to return "" rather than null values for the custom fields.
Regards,
Bozhidar
Progress Telerik
Hi Bozhidar.
First, Thanks for your quick reply.
Yes, I tried it with setting "", but there is another obstacle here. If your custom field is nullable date, and you use the "format" option of your custom column, you'll get another null no matter how you change the data :). In my oppinion the best is to have a template which will make the whole gantt even more powerfull. I found such request in the Progress project map, but it is low voted and it's normal because of the low gantt usage after all.
Best Regards, Boyan.
I've increased our internal priority for the Cell Template feature of the Gantt, which would indeed address this issue.
Regards,
Bozhidar
Progress Telerik
Hi Bozhidar,
Sounds great. Thanks a lot for your support and professional attitude. :)
Best Regards, Boyan.