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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics 365 | Integration, Dataverse...
Answered

Disable an editable field in the Power Apps Grid Control feature.

(0) ShareShare
ReportReport
Posted on by 105

I'm currently using the out of the box 'Power Apps Grid Control' pcf on a subgrid to display child records. This is ideal as I need to show option set colours and allow the users to edit the data inline.

I have the 'editable' option set to 'Yes' but there is one field in the subgrid I want to prevent users from editing.

I have tried numerous methods mentioned online including using a 'business rule' and javascript.

However, none of these methods seems to be affecting it and I'm wondering if these would traditionally be used with the 'Editable Grid' control as opposed to the 'Power Apps Grid Control'.

Has anyone come across this before and can they advise how this can be done? There is also a chance I could be implementing these changes incorrectly and they work fine for others?

I have the same question (0)
  • Community Member Profile Picture
    on at

    cool

  • Leco Lv Profile Picture
    Microsoft Employee on at

    Hi partner,

    I think Js should be able to do it (setDisabled ), can you provide your code?

    GridCell (Client API reference) in model-driven apps - Power Apps | Microsoft Learn

  • AMD99 Profile Picture
    105 on at

    Hi, below is the code I'm using, triggered when a record is selected in the subgrid UI.

    function fnLockFields(executionContext) {

       let oFormContext = executionContext.getFormContext();

       if (oFormContext) {

           let arrFields = ["new_currentstatus"];

           let objEntity = oFormContext.data.entity;

           objEntity.attributes.forEach(function (attribute, i) {

                  if (arrFields.indexOf(attribute.getName()) > -1) {

                     let attributeToDisable = attribute.controls.get(0);

                     attributeToDisable.setDisabled(true);

                  }

           }

    )};

    }

    pastedimage1671009344302v1.png

  • AMD99 Profile Picture
    105 on at

    I just tested my code on the regular 'Editable Grid' control and it works. But does not work with the 'Power Apps Grid Control'

  • Verified answer
    Leco Lv Profile Picture
    Microsoft Employee on at

    Hi partner,

    I noticed that this is a preview function, and maybe only the following two types are currently supported.

    Power Apps grid control(preview): learn.microsoft.com/.../the-power-apps-grid-control

    pastedimage1671096635587v1.png

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 Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the March Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Microsoft Dynamics 365 | Integration, Dataverse, and general topics

#1
11manish Profile Picture

11manish 176

#2
ManoVerse Profile Picture

ManoVerse 56 Super User 2026 Season 1

#3
Niki Patel Profile Picture

Niki Patel 42

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans