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
- is there a better way to do this ? (I don’t like the data table block* )
- 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.
Thanks,
H
EDIT: pasted in the wrong image.