How to prevent focus changing with selectRow?

hello,

i have several grids and want to select single rows without moving the focus from one grid to another. Is there a way to do this?

thanks from a newbee
Andruscha

You can try to use setActive() grid method

I am having the same problem and just found this post.

The page has 1 treeGrid and 2 grids. When the treeGrid has “focus” and then the up arrow is pressed, then grid 1 and grid 2 need to move their selection.

In the treeGrid’s “onBeforeSelect” method, I issue:

  gird1.selectRowById(id)  
  grid2.selectRowById(id2)

And the 2 grids select the correct rows.

The problem is when the down arrow is pressed again, grid2’s selection moves instead of treeGrid.

So in treeGird’s “onRowSelect” I did:

  this.setActive()

And that worked! The next down arrow keys moves the treeGrid’s selection.

I does not look like setActive() is a documented method of grid (or treeGrid).

Is this still the correct way to solve this problem? If so, can you please support this function it in future releases (and possibly document it)?

You may use the setActive() method for sure. It is not planning to remove it from the codebase.
Your suggestion is taken into account and we’ll pay attention to add the method to the documentation.

Thank you!!!