getGridColumn returns null although the key is exist

I am working on custom context menu and I would like to hide grid columns. Because of this, according to example, first of all, I try to get column data using getGridColumn. However, it return null. I am creating gantt instance with this “window.Gantt.getGanttInstance();”

My column configuration is;

{
    columns: [
      {
        name: 'demandNo', label: 'Demand ID', width: 80, resize: true, tree: false, align: 'center', hide: false
      },
      {
        name: 'text', label: 'Name', width: 200, resize: true, tree: true, hide: false
      },
      {
        name: 'score', label: 'Score', width: 80, resize: true, hide: false
      }
   ]
}

My usage like this;

this.ganttInstance = window.Gantt.getGanttInstance();
window.selectedGanttInstance = this.ganttInstance;
....
....
window.selectedGanttInstance.getGridColumn("demandNo") // returns null

Hello,
Gantt.getGanttInstance() command creates a new Gantt instance. So instead of choosing the gantt instance, you create a new one.
You can check how it works in the following snippet:
http://snippet.dhtmlx.com/ce2f09ef2