Hi,
I tried to follow “Configure Gantt Chart View by Showing Selected Custom Fields” article and show the custom fields created programatically in the default view.
TableField billablefld = new TableField();
billablefld.Field = Field.TaskFlag1;
billablefld.Width = 20;
billablefld.AlignData = System.Drawing.StringAlignment.Center;
billablefld.AlignTitle = System.Drawing.StringAlignment.Center;
billablefld.Title = “Billable”;
Aspose.Tasks.Table table = pj.Tables.ToList()[0];
table.TableFields.Insert(3, billablefld);
The above was written based on the sample code in the article. But I get an error at the bolded line as there are no tables in the project class. Kindly help in showing custom columns in the default view of gantt chart.
Regards,