jeudi 16 octobre 2014

Found a record in grid by name

i want to do something like

grid.getSelectionModel().select('nameInColumn');


i dont know the rowIdx that i want to select. // in one case before, i used the rowIdx for get what i want but in this case i dont know this id

In this case im uploading a photo and it shows the name of the product and the url of the image saved in my computer, i do a store.load() and then i want to focus that particular row for check if its correct.


for the upload of the image i create a new window and before close i do the store.load and try to get the selection of that row and everything creates well but it send me to the top of the grid


the code its like


Ext.Msg.alert('Great', 'your image of '+ action.result.name + ' its been succesfully load'+

'whit the name'+ action.result.filename,function () {

store.load();

var grid = Ext.getCmp("products-manufacturers-grid");

console.log(grid); // the grid its here and get all the rows i check

grid.getSelectionModel().select(action.result.name); // but what can i do something like this?

win.close();

});






Found a record in grid by name

Aucun commentaire:

Enregistrer un commentaire