Hide/show columns not working in Gantt chart

Hi, I;ve implemented column menu feature in my gantt chart. I want to hide particular columns at the initial load of the chart and then if user selects those from column dropdown, they should appear on chart. I tried visible: 'false' property in column field and also tried this.ganttObj.hideColumn('Stage','field') ​as solutions but neither worked. Is there any workaround for this?

1.PNG


3 Replies

MS Monisha Sivanthilingam Syncfusion Team October 29, 2021 09:29 AM UTC

Hi Ashutosh, 
 
Greetings from Syncfusion support. 
 
We have analyzed your query, however, we were unable to replicate the issue you reported. We were able to hide some of the columns by setting the visible: false property to them. Please ensure that you have mapped the property like the below code snippets. 
 
App.component.ts 
 
this.columns = [ 
  { field: "TaskID", width: 60 }, 
  { 
    field: "TaskName", 
    headerText: "Job Name", 
    width: "250", 
    clipMode: "EllipsisWithTooltip" 
  }, 
  { field: "StartDate", visible: false }, 
  { field: "Duration", visible: false }, 
  { field: "Progress" }, 
  { field: "Predecessor" } 
]; 
 
 
 
Please share an issue reproducible sample to us if the issue still persists. 
 
Regards, 
Monisha. 



AK Ashutosh Khanapure November 1, 2021 01:23 PM UTC

Thanks!!



MS Monisha Sivanthilingam Syncfusion Team November 1, 2021 01:29 PM UTC

Hi Ashutosh, 
 
You are welcome. 
 
Please contact us if you require any further assistance. 
 
Regards, 
Monisha. 


Loader.
Up arrow icon