Add and even rows in TMSFMXGrid

Hello,


I would like to have odd and even rows in different colors in a TMSFMXGrid but cannot find a way to achieve ths. Can anyone point me in the right direction?

Many thanks in advance
Gernot

Hi, 


Most of the features of the grid can be enable / disable and configured in the options property.
Odd and even colored rows in the grid is enabled with banding.

With TMSFMXGrid1.Options.Bands.Enabled := True
To change the event and odd colors , you will need to customize the grid style.

Kind Regards, 
Pieter

Thanks Pieter - will try


Kind regards
Gernot

Sorry for coming back - I am somewhat lost in the TLayout for a grid (being a newbie to Firemonkey as well). Would it be possible to get some more details or a small example?


Kind regard
Gernot

Are you using XE2 or XE3?

At present XE3

Hi, 


Thanks for the information, 
in XE3, the style manager has changed and uses the structure window to display the hierarchy when editing a style.
Right-click on the component and click "Edit custom style" which will show you a list of styleable layouts in the structure window. Select the tmsfmxgrid1style1: TLayout element which will show the complete set of styleable elements inside the grid in the center pane.

To style the banding in the grid, you will see a normal and a band cell style (in the structure window: normalcelllayout: TTMSFMXGridCell and bandcelllayout: TTMSFMXGridCell). These elements contain a Layout property which can be used to style the grid cell. In your case you would need to change the layout fill property of the band grid cell layout.

Kind Regards, 
Scheldeman Pieter

Hi,


that works perfectly. Coming from DevEx Quantumgrid I had a different understanding of bands.

Kind regards
Gernot