Sorting and Filtering in custom generated cells

Sorting is disabled because table knows nothing about datatype of your column. To enable sorting for this column, I suggest creating a meta property for this value.

I’ve seen this response on the forum but unfortunately it doesn’t work in my case. I cannot add a meta property because I need a query to populate it and i am not allowed to use dataManager or call a service from the entity.
Is there an easy way to do it or I have to use some kind of a view model (not persisted entity) there to feed the datasource?


Of course, you can use not persistent entities and populate them programmatically.

You can create such entity using CUBA Studio. Just select Not persistent as Entity type.



In fact you can do it. Just obtain a reference to DataManager or your service through the AppBeans class:

DataManager dm = AppBeans.get(DataManager.class);
1 Like