web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Pages / Adding or removing a r...
Power Pages
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
    17 Super User 2026 Season 1 on at

    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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Pages

#1
Mohsin Ali Profile Picture

Mohsin Ali 18

#2
11manish Profile Picture

11manish 16 Super User 2026 Season 2

#3
anirudhev Profile Picture

anirudhev 4

Last 30 days Overall leaderboard