Posted 22 October 2024, 6:51 am EST
- Updated 22 October 2024, 6:56 am EST
Hi,
The issue is related to your implementation. Based on your implementation, you are setting the focus on the grid and setting the selection in the “OnAfterRender()” method.
The “OnAfterRender()” method is called only once when the “Test” Component is visible once when you first click the button. After subsequent button clicks, the “OnAfterRender()” method won’t be called, and therefore, the grid won’t be in focus anymore.
If you want to focus on the grid, on every time the button clicks, you could use pass notify the Test Component by passing a parameter and checking if the parameter is changed (i.e, if the button is click), make the focus back to the grid.
Refer to the modified sample and the below gif.
Regards,
Ankit
FlexGrid.zip