-
14 Nov 2012 12:06 AM #1
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
-
15 Nov 2012 12:11 PM #2Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 33,656
- Vote Rating
- 435
- Answers
- 3109
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.
-
16 Nov 2012 10:35 PM #3
-
18 Nov 2012 6:31 AM #4Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 33,656
- Vote Rating
- 435
- Answers
- 3109
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.
-
18 Nov 2012 6:43 AM #5


Reply With Quote