TTMSFMXGrid Auto Width and Column Formatting

Greetings

I am learning more about TTMSFMXTableView, and I have a 7 column grid manually set up and working. I have a couple column layout questions:

1) I would like the first 3 columns to auto size to fill the grid space. I have Stretch and StretchAll enabled and it does resize nicely. And I see how to specify one column for resize. How do I make the first three columns resize automatically to fill the space and leave the last 4 as fixed?

2) There is a blank first column that I did not create. How do I change the size of the first column or completely get rid of it?

Thanks,
Scott Lynn

Column stretching is applied to either one column or to all columns. There is at this time not a built-in feature to do the column stretching to multiple selected columns.


I guess the first column is a fixed column. You can remove fixed columns by setting grid.FixedColumns = 0.

Greetins, this is a grid not a tableview question and I apologize for the confusion. Specifically this is a grid bound to data through a bindings list. Setting FixedColumns to 0 does not seem to do anything. Setting the width to 0 for the first column in the grid Columns list doesn't work, but setting the width to 1 for the first column does effectively get rid of the column.

Back to the resizing option, how do I make a column visible or invisible on the fly? So if I have a 8 column grid that is autostretching to fill, but the width of the grid drops below some given value, such as 500 pixels, I want only columns 2, 3 and 8 to still be visible. If they resize so the grid width is greater than 500, I want all columns to be visible again.

Thank you again for all the help. I will learn this tool eventually and am quite happy so far.
Scott Lynn

When you use binding, do you effectively use TTMSFMXLiveGrid that was specifically designed to do livebindings?

You can use grid.HideColumn(colindex) / grid.UnHideColumn(colindex) to hide/unhide a column. Bruno Fierens2016-12-26 17:18:05