Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
300
Set value of CustomTaskColumn to new task
posted

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?

Parents
No Data
Reply
  • 23930
    Offline posted

    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.

    WGV_SetCustomTaskValue.zip
Children