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?
Hi Simon,
I am glad that your issue is resolved. Do not hesitate to ask any additional questions you may have.
Thank you for using Infragistics Components.
HI,
Your method did help me resolve my issue but for this particular issue i ended up using the resources field instead.
Sorry for not updating you sooner.
Regards
Simon
Thank you for the reply.
Have you been able to test my sample? If yes please let me know what were the results.
I am looking forward to your reply.
That's looks like it could do it.
Many thanks, ill test and get back to you.
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.