Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Power Apps Pro Dev & ISV
Answered

Editable Grid - How to setFilterXml on subgrids

(0) ShareShare
ReportReport
Posted on by 306

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?

  • Rkaur Profile Picture
    84 on at
    Re: Editable Grid - How to setFilterXml on subgrids

    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.

  • cchannon Profile Picture
    4,702 Super User 2025 Season 1 on at
    Re: Editable Grid - How to setFilterXml on subgrids

    @tschopp did @DianaBirkelbach's post help resolve your issue? Please come back and mark the solution so future visitors will see!

  • Verified answer
    Diana Birkelbach Profile Picture
    3,072 Most Valuable Professional on at
    Re: Editable Grid - How to setFilterXml on subgrids

    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!

  • cchannon Profile Picture
    4,702 Super User 2025 Season 1 on at
    Re: Editable Grid - How to setFilterXml on subgrids

    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.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Leaderboard > Power Apps - Power Apps Pro Dev & ISV

#1
WarrenBelz Profile Picture

WarrenBelz 109 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 82 Super User 2025 Season 1

#3
mmbr1606 Profile Picture

mmbr1606 71 Super User 2025 Season 1

Overall leaderboard