Hi, I need to style individual cells and/or entire grid row based on custom logic. With old jmix I achieved this with styleProvider. Is there an equivalent of this for FlowUI dataGrid? Thanks.
Hi!
It looks like a part name generator is what you need.
Here is an example of usage:
FlowUi Samples link https://demo.jmix.io/ui-samples/sample/data-grid-part-name-generator
It’s also worth taking a look at the Vaadin documentation: Grid | Components | Vaadin Docs
Regards,
Dmitriy
Hi Dmitriy,
partNameGenerator works fine.
But, I have round 150 columns in the grid where I need to change the color
for getting a traffic light dashboard.
Is there a way to loop through the columns instead of defining the partNameGenerator for each single column?
KR
Roland
Hi!
In this case, I think the only possible way to create a DataGrid
would be to fill it programmatically using the addColumn
method. In this case, I think the only rational way to create a table would be to fill it programmatically using the addColumn method. And after that add the partNameGenerator
for each column.
Regards,
Dmitriy
Hi Dmitriy,
thx for the quick answer!
I did it the standard way, coded the partNameGenerator for each column.
Works fine…
The only thing I noticed:
When generate the entity automatically and also let the list view be created directly,
the generated descriptor code looks fine.
But when I add a datagrid item into an existing view descriptor,
I only get (in this case) 155 created, without any property or id or other attribute.
Looks like an issue.
KR
Roland