How to color grid cells according to properties that are hidden in grid?

Hi Community,

I hope somebody can give me some hints to solve the following use case.

I use an onAfterGet Server Method in ItemType Part that colors certain columns like ‘state’. Now I want to add some color to an additional property that contain the ERP-Number of a Part.

The ERP-Number column shall be colored according to two other properties that give information about the state of the erp transfer. But I don´t want to display the two additional properties in the main grid. That´s why the two properties are hidden by default.

This now leads to the following problem. When my two state properties are hidden, they are not part of the get query that is run when performing a simple search in the Part grid. When the properties are not selected in with the get query, I cannot use them for coloring with my onAfterGet method. Is it somehow possible to add the two properties to the grid select query, but without showing the properties in the grid?

Or does anybody now other ways to add some color to grid cells? I am thinking about some federation approach, but maybe this one can be solved easier. Thanks for any help!

Best regards,
Angela

Parents
  • Hi community,

    I am reopening this issue cause I am still look for a proper solution for this task. Coloring cells according to hidden properties could be a real powerful way to highlight data.

    I made some tests with a custom variant that shows icons instead of colors. This would give us a lot of ways to keep the grid compact while still presenting all information of interest for the end user:

    While I was successful to display custom icons in the cell without performance issue, I still face the same error message when opening a BOM.

    I am right now look for a solution to overwrite the select query on form open. Maybe someone wants to join this project and has an idea?

    Angela

  • 0 オフライン in reply to AngelaIp

    Hey , I've followed you Git examples for the coloration and really appreciate your sharing of those!  Is is possible to give an example of how you got an Icon like the above?  Thanks in advance!

Reply Children