Watch, Follow, &
Connect with Us

Please visit our new home

Welcome, Guest
Guest Settings

Thread: FMX.TGrid is broken when ControlType is set to Styled on iOS

Permlink Replies: 0
Michael Gonyea

Posts: 10
Registered: 4/6/12
FMX.TGrid is broken when ControlType is set to Styled on iOS
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jan 9, 2018 1:46 PM
Hey folks,

Originally we wrote an application in Delphi Berlin that uses several FMX.TGrids bound to FireDAC memory tables via LiveBindings. The grids work perfectly in Berlin 10.1, but are completely broken in Toyko. In Tokyo, when the ControlType property of the TGrid is set to styled, you can only edit cells once before they become "broken" and in an unusable state. This issue continues to occur no matter which cell you edit. Here's steps to reproduce:

-This was done with Toyko's original release, and the newest 10.2 [Dec 17] update; also requires an iOS device to test (tested w/ iPad Air and iPad Pro)

1) Create a new Multi-Device Application
2) Set the Target Platform to IOS 64
3) Drop a Firemonkey TGrid onto the Form
4) Drop a TPrototypeBindSource and add 3 Integer fields
5) Bind the TGrid to the TPrototypeBindSource via LiveBindings
6) Build & Run the application on the iOS Device

When you tap a field to edit it, you can edit the value no problem. After you dismiss the virtual keyboard, try tapping/editing the same cell again. The keyboard will show up, but the cell editor does not appear and when you edit the value and close the virtual keyboard the value doesn't save/commit to the field in the Grid. Next, try editing a completely different cell and it will work fine, but if you try to edit the same cell (or the 1st cell you edited) the same issue occurs.

The only option is to set the ControlType to "Platform" but we end up losing a lot of the events we're taking advantage of (i.e. ones that worked perfectly in Berlin). Also, the cells can no longer display Multi-Line text (e.g. via CR/LF breaks). When ControlType=Platform, we can't override display/writing of text because OnDrawCell is no longer called when ControlType=Platform.

Does anyone know if there's a fix we can do in Delphi's source code to make the Styled grids work properly again in Tokyo?
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02