click-event for record item

January 5th, 2009
  • Hi,

    I am creating an editable Grid at he moment and got one Problem:

    The Grid contains names of items, which should be editable by double-clicking them. This works perfectly.
    But I also want to load some more Information about an item when single-clicking on it, but for this I need to use the click-event for the record, but I have no idea where it is (already browsed the documentation).

    So my Question is:

    Where can I find the raw onClick-event of a column in an Ext.data.record object like this:


    this.MKZrecord = Ext.data.Record.create([
    {name: 'id', type: 'int' },
    {name: 'name', type: 'string'},
    {name: 'beschreibung', type: 'string'}
    ]),


    in a column model like this:


    this.MKZcm=new Ext.grid.ColumnModel([{
    id:'name',
    header: 'Name',
    dataIndex: 'name',
    width:220,
    editor: new Ext.form.TextField({
    allowBlank: false,
    blankText: 'Sie müssen einen Namen eingeben'
    })
    }]),


    What I already found is the listeners config-option in the column model. But I do not know how to use it in my case, and I also think that the listeners-specification only works for the whole column, not for the single rows.

    Thanks for help,

    Northrog


  • Here's one way to doi it:


    new Ext.grid.EditorGridPanel({
    ...
    listeners : {
    rowdblclick : function(a, b, c) { // Look at the docs for what params are passed to the rowdblclick event handler
    /// do some thing with a, b, c

    }

    }


    });







  • #If you have any other info about this subject , Please add it free.#
    Your name:
    E-mail:
    Telphone:

    Your comments:


    If you have any other info about click-event for record item , Please add it free.