Passing Data Table Name from another app

Let me take that back. It is working with ‘some’ columns. It worked for _id column but not for Col1, Col2, or Col3

Found the issue. It’s case sensitive. For some reason, tables are lower case but Data Grid is showing first letter of table name as Upper case, which is why it was not working, I am all set. Thanks very much Mark!

1 Like

There is a really important concept in this thread that eluded me until I read it:

Data binding works with more than just simple data types. Data binding works with lists and objects and lists of objects. This should have been obvious to me, but was not.

My epiphany, of course, brought other questions to mind.

If the Row Data Logic is bound to a data item in PageData, I cannot also have Codeless logic in the Row Data Logic. Correct?

So, suppose I have a data grid on a page that I want to bind to a data item in PageData, is the best practice to initialize the data item in the On Page Enter event?

@Howard_Jacobson, please see my response below, but please post each new question in a separate topic, it will help others find answers in the future.

yes, that is correct. You can either bind some “logic property” to a property in the data model OR add logic to that property to get the data.

if at the time the page is being loaded and initially rendered you know what data the grid should display (as we do in the example above), then yes, you want to do that initialization as early as possible to minimize the wait time for the end user.

Regards,
Mark

1 Like

Excellent. Bridges a big conceptual gap for me.

Since Data Grid changed some of the names in the frontend, what’s the best way to rename some of columns (only on the front end).

2023-05-23_17-45-33

Hi. You can rename your column by Schema → Visual Modeller or Table Editor

This will change the name on the schema/blackened which I don’t want. I need to change the name only on the frontend when displaying it to the user.

Sorry, seems like it’s impossible at this moment

I seriously doubt that. If I am able to get the column names and also able to skip a few columns by by specifying the name, it means the system is reading the names. If I have the names I should be able to transform the name via if then statement. @mark-piller

Any help is appreciated here.

If you change the column name in the column definitions, how would the system know which property to read and display for that column?

@mark-piller No, not in the column definition. I only need the name to be shown differently on the front end. For eg. in data grid, the column name is shown as “ordered by”, I would like to show the column name as “ORDERED BY”. For this I will have to use UPPERCASE text block to convert the column name, correct?

It’s just on the BE frontend display, I need this changed. Behind thee scenes (in DB/tables), column name will be untouched.

A name of a column in the user interface comes from the column definition. Suppose you have column X and you want it to be displayed as Y. Then data comes in that has this:

"X":"foo"

How will the data grid know that the value of foo should be displayed in column Y? It cannot and it will not.

BE does not allow spaces in column names. If we need to “beautify” the column name before presenting it to the user, what’s the best way to do this in Data grid?

I believe if you use the camelCase naming convention, the system will “beautify” the names. For example:

cityName

will become

City Name