Hi,
We can’t disable sub grid using out of the box “setDisabled” method.
But there is an unsupported way to disable the grid.
Actually sub grid renders as HTML Span, so we can disable the span using below function
function disableSubgrid(subgridName) {
var subGrid = document.getElementById(subgridName + “_span”);
if (subGrid) {
subGrid.disabled = “true”;
}
}
How Do I call this method :-
- If your subgrid name is “gridContacts”, Pass the name to the function disableSubgrid(“gridContacts”)
Hope it helps 🙂
![[Step by Step] Beginner : Create a PCF control and add it to a custom page](https://rajeevpentyala.com/wp-content/uploads/2024/12/image-49.png)


Leave a comment