Just trying to get a look and feel for a FNC Grid. I have the grid working with an XData server. I have added 4 columns with the FNC Grid database adapter.
Then I started to set a few properties with the grid's columns property. I set the columns width property for each column, and the width changed at design time, but at run-time, the default width was used.
How do I set the width of each column?
Can I specify that the grid's RowSelect is true, so when I choose a row, the row is selected and not just a cell?
How can I colour alternate rows 2 different colours?
When connecting with a dataset through the database adapter, the columns are recreated, and thus loosing the column/width. You can override this with TMSFNCGrid1.ColumnWidths property after the dataset has been activated.
For the RowSelect, you can change the Options.Selection.Mode property to smDisjunctRow and this should allow you to select a complete row.
For coloring rows, you can take a look at the OnGetCellLayout event, access the Layout property and change the fill. This way you can customize a cell, or multiple cells.
Additionally, please take a look at the documentation of the grid:
Thanks again. Could I just ask
what the StretchColumn does? Is it suppose to indicate which column gets
stretched? Regardless of the number I tried, it was always the last
column that was stretched.
If this is not what that property is for, is there any way of specifying which column gets stretched?