extjs - Grid - button click handler -
in grid, when click on action button (the delete , edit button shown in code below), need pop open window without alerting user alert message;
in following code using handler handler: buttonclicked , trying access row value clicked different function below; buttonclicked :function (){...
1.) don't know how this, can please me ?
2.) can access row clicked , display name controller class ?
ext.define('countryapptest.view.user.gridview' ,{ extend: 'ext.grid.panel', initcomponent: function() { this.store = 'store'; this.columns = [ { xtype:'ac', items: [{ { icon: 'lib/extjs/examples/restful/images/delete.png', handler : buttonclicked }] }, { text: "username", dataindex: 'username' } ]; this.viewconfig = { forcefit: true }; this.callparent(arguments); }, buttonclicked:function (grid, rowindex, colindex) { var rec = grid.getstore().getat(rowindex); ext.msg.alert("info","name " + rec.get('username')); } });
add parameters (grid, rowindex, colindex) buttonclicked declaration.
Comments
Post a Comment