Ok, so I have a bit of a quandary...I'm creating a Grid with dynamic columns. Additionally, data for these columns may come in with a variety of names. For instance, the user may want a column that is labeled 'Name', but the underlying data may have any of these keys: 'name', 'label', or 'title'
'name', 'label', 'title' => 'Name'
The data coming into the grid could have a structure something like this:
data = [{'metaData': {'data': [{'theKey': 'label', 'theValue': 'alfred'}]}}, {'metaData': {'data': [{'theKey': 'title', 'theValue': 'jameson'}]}}, {'metaData': {'data': [{'theKey': 'name', 'theValue': 'Renee'}]}}, {'metaData': {'data': [{'theKey': 'label', 'theValue': 'trisha'}]}}]
For this example, the result I would like for a single column 'Name' would be: 'alfred', 'jameson', 'Renee', 'trisha'
I've tried passing local data to a server-bound template. (Please refer to attachment) Unfortunately this seems to result in the template becoming locally bound.
Are there any other solutions? Perhaps I could call 2 datasources for a single column (1 for the column mappings and another for the data), but I'm not sure if this would solve any issues.
Thank you!
(I'm doing this in a JavaScript/React app, so I don't have direct access to the DOM.)