Monday 15 June 2015

Extjs Grid always selects first row, even if i select any other row -


I am trying to create an extjs grid with editing features. I was able to fill the grid with my store data. But when I select a row (say line 5), line 1 is selected.

  Ext.define ('Ext.User', {extend: 'Ext.grid.Panel', nickname: 'Widget.user', Title: 'user', // set store IconCls: 'config', // stateful: false, store: 'User', selModel: new Ext.selection.RowModel ({singleSelect: true}), InitComponent: function () {this.column = [{text: 'user ', Width:' 5% ', dataIndex:' userName ',}, {text:' password ', width:' 5% ', dataIndex:' password ',}, {text:' roll ', width:' 5 % ', Dotindex:' rollname ',}, {text:' last login ', width:' 5% ', dataindex:' last login ',}], this.Wwidth =' 100% ', this.height = '100%', this.callParent ();}});  

Why any suggestions might be made in advance thanks

If I understand you correctly, then you want to manage your storage data by selecting a straight line.

The solution then enables your grid to listen to your clicks properly

  {xtype: 'grid', Title: 'GridTit', Store: Extension.store The Manager. (StoreId), listeners: {cellclick: function (grid, td, sandyx, record, tr, line index, e) {}},  

so the code above should be in your Able to handle some line with data

Hope this will help


No comments:

Post a Comment