Results 1 to 2 of 2

Thread: Problem with EditorGridPanel

  1. #1
    Sencha User
    Join Date
    Aug 2010
    Posts
    28
    Vote Rating
    0
      0  

    Default Problem with EditorGridPanel

    Hi Everyone. I'm here because I don't know what to do.

    I Have This EditorGridPanel:

    Code:
    var grid_insumos = new Ext.grid.EditorGridPanel({
                x: 10,
                y: 75,
                id: 'grid_insumos',
                title: '<center>Materiais</center>',
                 frame: false,
                 border: true,
                 columnLines: true,
                 anchor: '-10px',
                 enableColumnMove: false,
                 enableHdMenu: true,
                 bodyStyle: 'border-color: #B5B8C8; padding: 0px;',
                 autoExpandColumn: "Descricao",
                 loadMask: true,
                 height: 250,
                clickstoEdit: 1,
                store: storeMateriais,
                cm: ColumnModel,
                sm: new Ext.grid.RowSelectionModel({singleSelect:true})
            });
    In one of the grid columns is rendered a button that open a window with some values. These values are related to the value of the selected row.

    this is the grid of the new window:

    Code:
    var grid_valoresmediosinsumos = new Ext.grid.GridPanel({
            x: 10,
            y: 10,
            id: 'grid_insumos',
            title: '<center>Materiais</center>',
             frame: false,
             border: true,
             columnLines: true,
             anchor: '-10px',
             enableColumnMove: false,
             enableHdMenu: true,
             bodyStyle: 'border-color: #B5B8C8; padding: 0px;',
             autoExpandColumn: "Nota",
             height: 250,
            clickstoEdit: 1,
            store: storeValoresInsumos,
            cm: ColumnModel,
            sm: new Ext.grid.RowSelectionModel({singleSelect:true}),
            listeners:{
                rowdblclick: function(row, rowIndex, obj){
                    var valor = storeValoresInsumos.getAt(rowIndex).get('Valor_Unitario');
                    
                    atualizaValor(valor,linha);
                            
                }
            }
        });
    When the row of this grid is selected the value of the first grid is updated.

    I'm using "var linha = Ext.getCmp('grid_insumos').getSelectionModel().getSelected();"

    The problem is:
    It works only the first time.
    When I try again the error occurs: "Ext.getCmp("grid_insumos") is undefine" on the line "var linha = Ext.getCmp('grid_insumos').getSelectionModel().getSelected();"

    Someone have any idea what's happening?

    Thanks for the help.

  2. #2
    Sencha User
    Join Date
    Aug 2010
    Posts
    28
    Vote Rating
    0
      0  

    Default

    Don't waste your time on this post... I solved the problem.
    Thanks for the help!

Similar Threads

  1. Need a problem with editorgridpanel
    By sseema in forum Ext 3.x: Help & Discussion
    Replies: 1
    Last Post: 22 Dec 2009, 3:12 AM
  2. Problem with EditorGridPanel
    By EmilianoIT in forum Ext 2.x: Help & Discussion
    Replies: 4
    Last Post: 25 Jun 2009, 2:03 PM
  3. Problem about EditorGridPanel
    By hash_man in forum Ext 2.x: Help & Discussion
    Replies: 1
    Last Post: 16 Mar 2008, 4:20 AM
  4. Problem with EditorGridPanel
    By jbeduya in forum Ext 2.x: Help & Discussion
    Replies: 0
    Last Post: 7 Dec 2007, 7:00 PM
  5. Problem with EditorGridPanel
    By jbeduya in forum Ext 1.x: Help & Discussion
    Replies: 0
    Last Post: 7 Dec 2007, 10:20 AM

Posting Permissions

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