Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Pages - General Discussions
Unanswered

Adding or removing a record on a subgrid

(0) ShareShare
ReportReport
Posted on by 29

I have a JavaScript function which identifies if a subgrid has any rows. This works very well for pre submit validation but i would also like to perform this validation when i add or remove a row from the subgrid.  I have tried the following code but adding or removing a row from the power apps portal grid does not seem to trigger these events .

 

Can anyone recommend  a solution

 

Thanks Gary

 

$("#mytable").on("rowAddOrRemove", function (event) {
// validate
}
 
and also
 
 $("#mytable").bind("rowAddOrRemove", function (event) {
//Validate
}
Categories:
  • Fubar Profile Picture
    7,966 Super User 2025 Season 1 on at
    Re: Adding or removing a record on a subgrid

    Someone else may have an easier way, but you may need to look at using a MutationObserver to pickup changes to the DOM.  This post has an example of one for the SharePoint grid   https://powerusers.microsoft.com/t5/Power-Apps-Portals/SharePoint-Document-Location-Subgrid-quot-loaded-quot-event-in/m-p/1340839#M11880

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

Michael Gernaey – Community Spotlight

We are honored to recognize Michael Gernaey as our June 2025 Community…

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

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

Leaderboard > Power Pages

#1
Fubar Profile Picture

Fubar 69 Super User 2025 Season 1

#2
oliver.rodrigues Profile Picture

oliver.rodrigues 49 Most Valuable Professional

#3
Jon Unzueta Profile Picture

Jon Unzueta 43