Saravanan
Saravanan

Reputation: 1889

Unable to get property 'id' of undefined or null reference

I am trying to create a Ext.PagingToolbar, which works perfectly in all major browsers including IE9 and IE 10. But in IE 8 and below, it ends up with the following error.

Unable to get property 'id' of undefined or null reference

When I traced, I found the error occurs in the following code.

var cm = new Ext.grid.ColumnModel({
    defaults: {
        sortable: true
    },
    columns:
      [
        {
            header: 'Result Set',
            dataIndex: 'result_set_name'
        },
        {
            header: 'Result Date',
            dataIndex: 'result_date',
            xtype: 'datecolumn',
            format: 'm/d/Y',
            dateFormat: 'c'
        },
        {
            header: 'Comments',
            dataIndex: 'comments'
        },
        {
           header: 'Link',
           dataIndex: 'link',
           renderer: function(value, metaData, record, rowIndex, colIndex, store) {return '<a href="'+value+'">'+value+'</a>';}
        },
      ]
});

But I cannot find the source of issue and what need to be done. Any help is appreciated.

Upvotes: 6

Views: 13664

Answers (1)

sra
sra

Reputation: 23983

Your error is that you end the columns array with a comma which leads to such a error. The IE tries to read a object after the comma which will be undefined

Upvotes: 13

Related Questions