setInitialValues for Data Grid


We were initially using a table and used the setInitialValues() method to set some values. We had to switch over to Datagrid for the inline functionality, but as i understand the setInitialValues() method is available only for inheritors of ListComponent (Standard Actions over Collection - CUBA Platform. Developer’s Manual).

What could be other workarounds to set a value when the create action is used when using a Data grid ?



The DataGrid component also implements the ListComponent interface (and the ActionsHolder interface), so working with actions the same as for the Table component.

Pay attention that the setInitialValues method declared in the CreateAction and its usage is not limited by any components.

1 Like


Thank you so much, i had injected an action and the create action and tried setting the initialValues

Its solved now!