do you want change the "fields" binding in runtime?
----------------------------------------------
The higher the degree, the greater the respect given to the humblest!RAD 11.3
Firstly, you should detach yourself from the way of procedurally coding the code by "Design Patterns".
Don't think of "LiveBinding" as a simple binding of a "DataSource" and a "DataSet" and a "Control" (like Gridxxxx). It's much more than that, and it shouldn't be seen in the same way.
The "LiveBinding" is a black box that uses the "Design Pattern Observer" as the basis of its concept, among other possible ones.
You can't think about creating something complex without knowing the fundamentals, because at some point, you'll have a hard time solving the side effects.
Keep in mind the following: whether you use "LiveBinding" in design-time or in code, the end result should be the same in the "LiveBinding" environment.
Honestly, this kind of situation is unusual and not very desirable. Purpose switching can lead to chaos within the system if you don't fully master the environment.
As already exemplified above, creating the "LiveBinding" environment by code is not very different from creating a data table with its fields and other necessary information in code, however, "LiveBinding" has particularities that differentiate it from the use of " DataSource + DataSet + Control".
In the end, you'll have an environment that works, practically, with text (only), and in each iteration of the control's properties, there are many conversions performed in the background, giving the impression that you are working with data of different types.
I advise you to first use the trivial as mentioned above.
Now, if you want to insist on this "dynamics" you are looking for, then understand that this will involve some side effects in the final software.
Anyway, I'll see if I can create something to exemplify in a simpler way... but without any promises ok?
hug
----------------------------------------------
The higher the degree, the greater the respect given to the humblest!RAD 11.3
- LiveBinding does use of "SCOPE" interface - LiveBinding does use of "CONVERSORS" interface - LiveBinding does use of "EVENTS" interface - LiveBinding does use of "MANAGER" class - LiveBinding does use of "BINDINGS" class - LiveBinding does use of "ASSOCIATIONS" class etc... so much
here just a sample in my tests to associate a "field" to "value" in LiveBinding environment...
it's not so easy than a "Dataset + DataSource + Control"
----------------------------------------------
The higher the degree, the greater the respect given to the humblest!RAD 11.3
---> LinkCR.FillExpressions.Items.ADD.... ------ List/Array/Strings are "0" based ... not "1" based! *by default
----------------------------------------------
The higher the degree, the greater the respect given to the humblest!RAD 11.3