Wednesday, June 10, 2020

Set a Field on the Editable grid disabled.

Add the below script to JS webresource and add that to Form Libraries:
function setChildGridEditability(gridContext) {
    var childGrid = gridContext.getFormContext().data.entity;
    childGrid.attributes.getByName("attributeLogicalName").controls.get(0).setDisabled(true);
}
Register event handler - function setChildGridEditability on Editable Grid - OnRecordSelect event.

Set Pass execution context as first parameter  checked... and Ready!

No comments:

Post a Comment