TMSFMXGrid initial selection

Hi Pieter


I'm trying to get my grid to first show with a specified cell selection, but it always selects cell[1,1]. Even if I put code in the form OnShow that calls SelectCells I still get cell[1,1] selected. Am I missing some setting?

Thanks, Bob

Hi, 


Did you change the SelectionMode to smCellRange?

Kind Regards, 
Pieter

Yes that's my default setting.


Cheers, Bob
Hi, 

The grid initializes it selection the first time it's loading.
The FormCreate and FormShow occur before this initialization.
You can set the grid selection in the OnApplyStyleLookup, which is triggered after the grid is initialized. You will need to set a flag, because the OnApplyStyleLookup is called multiple times.
We will investigate here if we can add an event for this, or a property to control the initial selection.

Kind Regards, 
Pieter