I have created a custom task column to my ganttview like:
plannedMaintGantt.CalendarInfo.CustomTaskColumns.Add("Address", typeof(string), true);Now I create new task to add this but when i try to set the value of the custom field
'task.SetCustomProperty("Address", "Test");'
i get
'Object reference not set to an instance of an object.'
Does anyone have any idea?
Hello Simon,
Thank you for contacting Infragistics Developer Support.
What could be the issue in your case is that you need to add the task to the task collection of the UltraGanttView before setting its custom properties. Once it is in the tasks collection you should have no issues to set the custom property.
I have attached a very simple sample which shows how to set the custom property of a single task. Please let me know if your issue still persists even with this approach.
I am looking forward to your reply.
That's looks like it could do it.
Many thanks, ill test and get back to you.