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

Notifications

Announcements

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:
I have the same question (0)
  • Fubar Profile Picture
    8,352 Super User 2025 Season 2 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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Pages

#1
Fubar Profile Picture

Fubar 74 Super User 2025 Season 2

#2
Jerry-IN Profile Picture

Jerry-IN 55

#3
sannavajjala87 Profile Picture

sannavajjala87 31

Last 30 days Overall leaderboard