Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM forum
Suggested answer

Nested grid editable field.

Posted on by 225

Hi Experts,

i need to edit the two fields in the nested grid View, can any body help me on this

Below image are the two field i need to unlock,please suggest me on this.

pastedimage1609413053547v1.png

Categories:
  • LearningAlways Profile Picture
    LearningAlways 10 on at
    RE: Nested grid editable field.

    Your code works for the Editable Grid, but I also want to disable fields on the 'Nested' grid...  When I use the same code for the OnRecordSelect event of the nested grid, I get an error:

    Cannot read properties of null (reading 'data')

    Here is the code I am using for both the Editable Grid and the nested Editable Grid:

    function setGridReadOnly(context) {

       var entityObject = context.getFormContext().data.entity;

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

                   var ctrl = attribute.controls.get(0);

                   ctrl.setDisabled(true);

           })

       }

  • Suggested answer
    MehranBre Profile Picture
    MehranBre 730 on at
    RE: Nested grid editable field.

    hi,

    Call the following function for the OnRecordSelect editable grid event. Also check "Pass execution context as first parameter".

    please verify if this useful

    Regards.

    function onSelectSubGrid(context) {
    
        var subGrid = context.getFormContext().data.entity;
    
        subGrid.attributes.forEach(function (field, i) {
            field.controls.get(0).setDisabled(false);
        });
    }

  • Suggested answer
    Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Nested grid editable field.

    Its not supported:

    docs.microsoft.com/.../make-grids-lists-editable-custom-control

  • Amrutha B K Profile Picture
    Amrutha B K 225 on at
    RE: Nested grid editable field.

    Hi Mike,

    Those two fields what i mentioned, is from different entity, for that how to remove unlock?

  • Suggested answer
    Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Nested grid editable field.

    What are the field types of those two locked fields?  Are they on a different record type/entity than the actual subgrid entity?

    They look like they might be related records from a 3rd entity (contact) where the parent child on the form is something else.  If thats the case you wont be able to edit those:

    dynamics365crmblog.wordpress.com/.../

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

Anton Venter – Community Spotlight

Kudos to our October Community Star of the month!

Announcing Our 2024 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Dynamics 365 Community Newsletter - September 2024

Check out the latest community news

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 290,532 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 228,501 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans