im using a embedded view in a table to display an alarmar in a row, each row has a diferente value that chanche a text field and a background image depending on a view’s value params.
theese are the view pictures and how it change depending param “criticidad” values
when i configure the table colum property it display like this
every row that i add displays the same view, at the moment im just trying to set one but there will be at least 20, with differents setups each and i’m strugled on how and where to asign differents params to each view per row. I found in the forum similars topics, but i couldn’t figure out how to set it up properly.
in the data property i tried the follows, non successful…
what am i doing wrong??
The Table only supports one View type per column, so I hope you mean twenty columns per row.
You don’t need to modify the viewParams property of the column config unless you want to hard-code values across ALL rows.
When a column renders a View, the View will receive the value of the column within a param named
I have constructed a View named “Popup” (I’m sorry, but I was already looking into something else) which has one param named
value. I am rendering the “population” column of the default data for the table as a View and I have specified the path to my View. I have not set any View params within the column configuration.
Current data structure:
Column configuration (note no
Instanced View param settings (note the param name is
So what YOU should do is either…
criticidad at the same level as
valor, and change your param name to
criticidad as a child of
alarma, and then change the column config to use
alarma as the column, and your instanced View will need to expect a param structure of
I recommend A.
Thanks a lot, option A worked great for me.
will there be a way to put the values of 2 columns in a single view?
Only if you’re using a subview, which receives all of the data of the row. If you’re rendering a view in a column, then that view will only receive the data of the column for that row.
If you add an empty object param named rowData to your view, the entire table row’s data gets passed into it. You would just need to know the key for the second column’s value you wanted.
I routinely use this to get some sort of unique identifier for the row I’m working with (e.g. id or name) so that I can call a message handler to update the data for the same row in the table from the embedded view.
Thanks, that works for me