getColumnModel - 2.0? Help...

  1. #1

    getColumnModel - 2.0? Help...

    I had the below function in 1.x - porting my app over to 2.0 and the getColumnModel is breaking - what can I do to the below to make it work in 2.0? Any help would be greatly apreciated as I am up against a tight deadline...

    var GetColumnTotal = function (grid, columnIndex) {
        var total = 0,
            dataIndex = grid.getColumnModel().getDataIndex(columnIndex);
        grid.getStore().each(function (r) {
            total += parseInt(r.get(dataIndex));
        });
        return total;
    };
  2. #2
    Please try to use GridPanel's columns property.

Similar Threads

  1. [CLOSED] getColumnModel does not work in 2.0 (port from 1.5 to 2.0)
    By gets_gui in forum 2.x Legacy Premium Help
    Replies: 4
    Last Post: Oct 16, 2012, 12:35 PM

Posting Permissions