Search code examples
javascriptextjsextjs3

Trying to record hidden and unhidden columns in columnmodel ExtJS 3.3.1


Trying to find out which columns are hidden and which are not.

Suppose I have table having columns

Name Place Animal Thing

Now I unhide the Animal column.

Name Place Thing

my code is as below

var columnmodel = new Ext.grid.ColumnModel({
    columns:[
        {header: "Name", id: "id", , sortable: true, dataIndex: 'Name'},
        {header: "Place", id: "entityType", sortable: true, dataIndex: 'Place'},
        {header: "Animal", id: "title", sortable: true, dataIndex: 'title'},
        {header: "Thing", id: "title", sortable: true, dataIndex: 'title'},
    ],
    listeners: {
        {@link #hiddenchange}: function(cm, colIndex, hidden)   {
            saveConfig(colIndex, hidden);
        }
    }
});

Now when I'm running this getting the following error

Uncaught SyntaxError: Unexpected token {

Above error is in the line {@link #hiddenchange} so can someone help me why I'm facing this error.


Solution

  • Try "{@link #hiddenchange}" instead of {@link #hiddenchange}