Best way to change column name in data grid block

I have a data grid block which is showing several columns from a view. the view column names are not very pretty. I but the data grid column names have to match the db column names to display them. I would like to change the date grid column name to “pretty column name”.

Looking through the docs, the Data grid does not seem to have a label so I can’t change it there ( as I can with a data table )
I can walk through the returned rows and add each to a new list just remapping the property.

then I was looking at the “map items in list” block but after looking at the tutorial

it looks like I’d be doing the same thing in that I’d have to create a new object from the old one with the changed property name and return it.

This leaves me with a couple questions

  1. is there a better way to do this ? (I don’t like the data table block* )
  2. is there any difference in performance doing this with a for loop vs “map items in list” block
    if so please explain ( for a short list this may make no real difference but what if you list was long?)
  • data table blocks let the column names scroll off the page which I really don’t like.
    EDIT: pasted in the wrong image.

Yes, and the better way is without using either Map or a loop. You can simply as the database to return the property values with whatever name/label you want assigned to them. For example, since all you need is human_name, value and units, the Load Table Objects would look like this:
UI Builder - ConsoleDemo - Backendless 2023-07-20 13-12-51

Awesome! thank you !