1. #1
    Sencha User
    Join Date
    Mar 2012
    Posts
    7
    Vote Rating
    0
    ehsanlinux is on a distinguished road

      0  

    Default Unanswered: how click or enter grid extjs row open other windows or alert

    Unanswered: how click or enter grid extjs row open other windows or alert


    what this code not work correct

    Code:
    Ext.require([
        '*'
    ]);
    
    
    Ext.onReady(function() {
        
        Ext.define('User', {
            extend: 'Ext.data.Model',
            fields: ['name']
        });
        
        // create the Data Store
        var userStore = Ext.create('Ext.data.Store', {
            model: 'User',
            data: [
                { name: 'ehsan' },
                { name: 'shah' },
                { name: 'Homer' },
                { name: 'Marge'}
            ]
        });  
    
    
    var myGride=Ext.create('Ext.grid.GridPanel', {
        renderTo: Ext.getBody(),
        store: userStore,
        width: 400,
        height: 200,
        title: 'Application Users',
        columns: [
            {
                text: 'Name',
                width: 100,
                sortable: false,
                hideable: false,
                dataIndex: 'name'
            }
        ],
        listeners: {
            rowclick:function(grid, rowIndex, columnIndex, e) {
              alert(rowIndex);
              console.log('Double clicked on ');
            }
        }
    });
    
    
    myGride.on('click', function(){alert(1);}, this, {
            single: true,
            delay: 100,
            forumId: 4
        });
    
    
    var myPanel=Ext.create('Ext.panel.Panel',{
        layout: {
            type: 'vbox',
            align: 'center'
        },
        items: [
            {
            xtype: 'numberfield',
            anchor: '100%',
            name: 'bottles',
            fieldLabel: 'Bottles of Beer',
            value: 99,
            maxValue: 99,
            minValue: 0
        },
            myGride  
        ]
       }
    );
    
    
    myGride.on('rowdblclick', function(grid, rowIndex, e) {
    alert(rowIndex);
    });
    Ext.create('Ext.window.Window',{
        layout: {
            type: 'hbox',
            align: 'center'
        },
        items: [
            myPanel
        ],
        title: 'Hello Window',
        width: 300,
        height: 300,
        id: 'myWindow'
    }).show();
        
    });
    
    not any alert when click or dbl click or

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    St. Louis, MO
    Posts
    34,121
    Vote Rating
    453
    Answers
    3160
    mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of

      0  

    Default


    Have you consulted the docs to see what events on Ext.grid.Panel
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    http://www.JSONPLint.com - Source to lint your JSONP!

    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is almost in print!

    When posting code, please use BBCode's CODE tags.

  3. #3
    Sencha User
    Join Date
    Mar 2012
    Posts
    7
    Vote Rating
    0
    ehsanlinux is on a distinguished road

      0  

    Default


    what docs ???

  4. #4
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    St. Louis, MO
    Posts
    34,121
    Vote Rating
    453
    Answers
    3160
    mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of

      0  

    Default


    The API docs that are in the downloaded zip file for the framework or under the Documentation menu at the top of this page.
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    http://www.JSONPLint.com - Source to lint your JSONP!

    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is almost in print!

    When posting code, please use BBCode's CODE tags.

  5. #5
    Sencha User
    Join Date
    Mar 2012
    Posts
    7
    Vote Rating
    0
    ehsanlinux is on a distinguished road

      0  

    Default


    It is possible to put an example here