priyaa
priyaa

Reputation: 21

to fetch a particular record

m writing the front end of my application using EXTJS.I have a grid say grid 1, and another grid say grid 2.i select a particular row from grid 1 and the items related to the selected row appear in my grid 2. if a user changes any item in grid 2 both the grids have to be refreshed.after reloading them i am not able to retain the selected row of grid 1. but i have a variable which stores a particular column value of the selected row. is there any way i can get my complete record on the basis of this column value.

Upvotes: 2

Views: 363

Answers (1)

Hemlock
Hemlock

Reputation: 6210

Assuming you know the field name in the record and that the value is unique for that field in the store.

var store = grid1.getStore();
var record = store.getAt(store.findExact(fieldName, columnValue));

Upvotes: 1

Related Questions