Question

I m trying trying to get row index so that i could fetch the value of the record in grid. On double click i m able to show alert with index of the row . I went through sencha docs but found no method to get the rowindex. I want data of each cell of record to be filled in textfield of form.

 itemdblclick: function (view, record, htmlItem, index, eventObject, opts) {   
     //var j1 = record.data.name;
     //var r1 = this.view.getSelectionModel( ) ;
     //var w = this.getData('index');
     alert("idx= " + index);
     //var RI = getIndex( );
     //var r1 = get(index);
     //Ext.Msg.alert('Hello');
     var win = new Ext.Window({
         title: 'hello',
         xtype: 'form',
         items: [..]
     });
     win.show();
 })
Was it helpful?

Solution

You can use store.getAt(index), or alternatively store.getById(record.get('id'))

Either of those seem like they'd work for you.

OTHER TIPS

win.down('form').loadRecord(record);

The record comes from the doubleclick event and is passed into your function.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top