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 Apps / Disable cell in editab...
Power Apps
Unanswered

Disable cell in editable subgrid dependent field in same subgrid

(0) ShareShare
ReportReport
Posted on by 47

Hi,

 

I have a business application that has a subgrid using (Power Apps grid control). I am trying to disable a yes/no column depending on if another column is set to Closed. I tried setting up a business rule for this however it doesn't seem to trigger when the subgrid loads only after you either double click the record or you change the yes/no column. I have done some research and it looks like the Subgrid has an object called GridCell that has a method setDisabled. Documention around this object isn't great and I am hoping someone can help point me in the right direction or has developed something for this issue.

 

Thank you

I have the same question (0)
  • Diana Birkelbach Profile Picture
    3,072 Most Valuable Professional on at

    Hi @krodgers , 

     

    Please have a look to my blog: https://dianabirkelbach.wordpress.com/2023/07/15/disable-cells-using-power-apps-grid-customizer-control/

     

    In the introduction I'm showing how to disable all cells of a row using onRecordSelect event.

    function onGridRowSelected(eventContext) {
     eventContext.getEventSource().attributes.forEach(function (attr) {
     attr.controls.forEach(function (myField) {
     myField.setDisabled(true);
     });
     });
    }


    And I link there another blog from @BenediktB about disabling cells for nested grids. 

    In your case, you would need to disable only the "yes/no" column you need.

     

    From what I've observed, sometimes that is not fast enough.. In Power Apps Grid, sometimes the user is able to make changes before the disable logic is applied. In that case the same blog is showing another solution which is more complicated: using a Customizer Control for Power Apps Grid.

     

    Hope this helps!

  • krodgers Profile Picture
    47 on at

    Hi @DianaBirkelbach 

     

    Thanks for this. Just wondering if you every found the time to create a generic one and uploaded it in to PCF Gallery?

  • Diana Birkelbach Profile Picture
    3,072 Most Valuable Professional on at

    Hi @krodgers , 

     

    Not yet.. but I'm planning to make one.

    That won't help with your requirement right now 😥, since I don't have a timeline yet.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 476

#2
WarrenBelz Profile Picture

WarrenBelz 365 Most Valuable Professional

#3
Vish WR Profile Picture

Vish WR 339

Last 30 days Overall leaderboard