Questions about FMX grid

I'm really impressed by the fremonkey grid component.  But I'm new to this (IOS Firemonkey) so if more experienced people could offer a nudge in the right direction I'd appreciate it.

I don't see how to programmatically set the text for the heading.  I'm just building the grid at runtime from a file and the first line (row) is the heading labels.

Also when importing from a csv file is there a way to specify that the first row is the heading labels?

Also is there an autosize property or method to automatically adjust column width?


OK, row 0 will contain headings.  I had a bug that hid that.

and logically the first row in a csv will be used as the heading.  I'll check that out.

So the only thing that I dont know is if there is the equivalent of autosize in a property or method that will adjust a columns width based on the width of the contents.



Yes you can call TMSFMXGrid1.AutoSizeColumns

Kind Regards, 

Thanks for the reply.  Another question:

How do you get the momentum scrolling that a native grid tends to show in IOS?

Incidentally autosizecolumns doesn't work for me in iOS in that assigned(cellcontainer) always fails.

are you performing Assigned(CellContainer) in the formcreate?

What exactly do you mean with momentum scrolling, do you mean swipe and scroll?

Scheldeman Pieter

I stepped into the autosizecolumns and each time it checked to see if assigned it failed so didn't autosize. I am creating rows/columns by increasing the rowcount/columncount.

Yes, swipe and scroll.

In fact swipe and scroll and bounce.



We have implemented touch scrolling but without animation. This would only decrease performance as the grid can possibly cover 100 columns and 10.000 rows.

Can you perhaps send us the code you are using to autosize and the location of the code, formcreate, formshow, buttonclick ?

Kind Regards,