Hi Ashmitha Kalkur
To filter DataGrid2 based on a tree selection in Mendix, start by setting up your domain model with a Category entity (used in the tree) and a Product entity (displayed in DataGrid2), connected via a many-to-one association (Product_Category). Use a Tree Node widget from the Mendix Marketplace or a custom widget to create the tree structure, sourcing the data through XPath or a microflow that returns the Category list. When a node is clicked, trigger a nanoflow or microflow that stores the selected category in a helper object—a non-persistent FilterContext entity associated with Category. In the nanoflow, either retrieve or create this FilterContext, set its selectedCategory to the clicked node’s category, and refresh the object if needed. For the DataGrid2, set the data source to XPath with a constraint such as [Category = '[%CurrentObject%]'], and ensure the FilterContext is passed as the context object to the page or surrounding Data View. Alternatively, use a microflow data source to filter the product list based on the selected category. For a more responsive experience, wrap the tree and DataGrid2 inside a Data View of FilterContext and refresh this context object via a flow on tree node click to enable live filtering
I hope this helps in identifying and resolving the issue.
Thanks