How to add column filter when retrieve data of associated entity

0
Hi Team, There are two entities RI and Product. Many Product is associated with 1 RI. In RI_Overview Page, I have added one column PL which is from Product entity. In Column settings -- Custom content but I cannot find reference to select. I am able to show PL data in RI_Overview Page. By using snippet and inside snippet added gallery. But in PL column filter, I have used text filter but it is not working.       Can anyone help me on this, how I can add filter for that column?    
asked
1 answers
0

Hi Sweety Kumari,

 

Configure the Drop-down Filter:

The most effective way to add a filter for an associated entity's attribute (like the Product Line from the Product entity) in a Mendix Data Grid 2 is to use the Drop-down Filter widget and leverage the column's Reference property.

Set the Data source of the filter to the associated entity (Product). Set the Display attribute to the Product Line attribute. This method allows the filter to properly constrain the Data Grid's main entity (RI) based on the selected value from the associated entity (Product).

Why the Text Filter Failed:

Initially tried using a text filter in the column, but it failed because the column was configured with Custom Content. Standard Data Grid filters cannot automatically filter data rendered via Custom Content; they only work on columns directly bound to an Attribute or Reference.

answered