Results 1 to 2 of 2

Thread: EditorGrid config object cm: colModel and getColumnModel

  1. #1

    Default EditorGrid config object cm: colModel and getColumnModel

    I'm just about there (I think) with the zen of ext, but I have a conceptual issue I need to clear up.

    With Ext 1.0

    In Ext/examples/grid/edit-grid.js the code presented to 'bind' the column model to the grid appears in the following:

        // create the editor grid
        var grid = new Ext.grid.EditorGrid('editor-grid', {
            ds: ds,
            cm: cm,
            //selModel: new Ext.grid.RowSelectionModel(),
    The column model is passed in a config object via the property named cm, but reading this in EditorGrid.js, it appears to be commented as colModel.

    My questions are:

    Where is the config object for the grid documented?

    Is there a consistent rationale (that I don't get yet) for calling the column model cm in the config object?

    How should I access the column model from the grid? Using Firebug, I appear to have to use grid.grid.getColumnModel. Why is this not grid.getColumnModel?

    Thanks & regards

  2. #2
    Sencha User
    Join Date
    Mar 2007


    This may partly be a holder-over from .33 compatibility. The config property name is cm - the grid constructor saves this as a property called colModel.

    The grid config hasn't been documented yet. Looking at the source, the only config entries are
    ds (dataSource), cm (colModel), sm (selModel), width and height.

    grid.getColumnModel() is the correct way to get the colModel

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts