With read-only grids in a model-driven app, we're able to change the filter XML for the grid from Javascript using the setFilterXml() function. With a two-tier Editable grids, this appears to still work for the parent grid data.
let gridContext= formContext.getControl("grid_StateTotals");
gridContext.setFilterXml(newFetchXML);
But how do I filter the records on the child grids (subgrids)? Is there a way to access the individual subgrids to set the filter XML?
Hello,
Have you find any alternate to this function in order to filter the subgrid dynamically ?
We do not want to use side pane option, as the purpose is different. Not to create or modify records but to select a record from a filtered lookup on this subgrid.
gridcontrol.setfilterXml(fetchXml);
is not helping to filter by the passed fetchXML.
Any alternate api method, kindly suggest ? How to achieve this requirement
Thanks.
@tschopp did @DianaBirkelbach's post help resolve your issue? Please come back and mark the solution so future visitors will see!
Hi @tschopp ,
Setting a custom/dynamic filterXml to a grid is the feature I'm missing the most.
Actually the setFilterXml you are using, is unsupported too.
As you say, we have even less control over the nested grids.
If the OOB feature doesn't help, maybe it helps to use the SidePanes for side-by-side editing instead of nested grids... (on select on the grid, open a form with a subgrid on the side-pane, like in this blog: https://dianabirkelbach.wordpress.com/2023/08/05/edit-subgrids-side-by-side-with-power-apps-grid-or-editable-grid/)
But it could be a Custom Page on the SidePane.
Hope this helps!
The modern Editable Grid is almost infinitely customizable now because its source is bundled with specific namespaces for customization and freely available for any developer to extend:
Customize the editable grid control - Power Apps | Microsoft Learn
That said, there are definitely safe and less safe things you might do in customizing the Editable Grid, and once you start pushing unmanaged customizations to it, it's your problem to own so do so carefully, and only if you already have a firm understanding of working with PCFs.
WarrenBelz
109
Most Valuable Professional
Michael E. Gernaey
82
Super User 2025 Season 1
mmbr1606
71
Super User 2025 Season 1