PDA

View Full Version : select item from gridview depend on id value of row



santoshsatav
8 Mar 2011, 10:04 PM
i have 2 grid loaded with same data,one grid is on main page an another one is on pop up window when pop up window opened selection on main page grid should reflect in pop up window grid , ie both grid having same selection, i tried several methods but none of them worked.

grid are "grid view" with grid "grouping store" and "checkbox selection model":-/

raj_plays
8 Mar 2011, 11:08 PM
Assuming that both grids use the same store and only 1 row can be selected in grid1,

var selected = grid1.getSelectionModel().getSelections()[0];
grid2.getSelectionModel().selectRow(store.indexOfId(selected.id));