View Full Version : Card Layout - Question

25 Jun 2014, 1:14 PM
Hi team,
In my card layout, I have defined my Card1 and Card2 like this.
Card1 and Card2 are both Grids.
User should select a row and hit Continue button to go to Card2. Card 2 should accept the value of the first column of the selected row on Card1 grid.
Based on this selected value, now the Card2's grid should load. As in, I want to make a rest call to load the Card2 Grid, based on the value of the row that was selected in Card1.

I am planning to use a global variable which I set after the row is selected and then should be used later for making the rest call.

Is there any other way.

Any help is highly appreciated.

Thanks in advance,

26 Jun 2014, 2:50 AM
if you do not destroy the grid in first card, it should still be accessible when you change the active item to grid 2.

var selectedRecord = grid1.getSelectionModel().getSelection()[0];

should work to get selected record and you can use get() method to get the value of the field you want.