Citizen Developer
  • All of Microsoft
  • My Role
    • All in My Role
    • Citizen Developer
  • Focus
    • All in Focus
    • Microsoft Ignite 2026
    • Generative Pages and Apps
    • Microsoft Copilot Studio
    • Copilot Studio - Agent Step-by-Step
    • What's Hot
    • M365 Release
Timespan
explore our new search
Power Apps: Disable Subgrid Cells Fast
Model-Driven App

Power Apps: Disable Subgrid Cells Fast

Microsoft Power Apps model driven app guide: lock and disable subgrid cells with JavaScript for safer data entry

Key insights

  • Video summary: Girish Uppal demonstrates a simple JavaScript method to lock or disable cells inside a model-driven app subgrid, showing a quick inline approach to prevent edits without opening the full record.
  • Microsoft direction: Microsoft is moving to the Power Apps grid control; the legacy Editable Grid is deprecated and the supported path for conditional cell behavior is a PCF customizer control (Power Apps component framework).
  • How to disable cells (high-level steps): add the Power Apps grid control to the subgrid, turn on Enable editing, create or configure a PCF customizer control, attach it to the target column, evaluate row/field context, and render the cell as read-only or disabled when rules require it.
  • Common use cases: lock fields when a record status is closed, block edits for users without the right role, allow edits only for the record owner, or prevent changes to calculated or system-controlled values in Dataverse views.
  • Constraints and best practices: the grid is read-only by default so you must enable editing; a JavaScript quick fix can work for small scenarios but prefer PCF for supported, reusable solutions and always keep server-side validation and Dataverse security rules in place.
  • Benefits of the PCF approach: delivers a precise user experience (edit only allowed fields), produces reusable business logic across views, aligns with modern Microsoft controls, and supports modern grid interactions without relying on deprecated components.

Video at a Glance

The YouTube video by Power Tech Speck (Girish Uppal) demonstrates how to disable a column field inside a model-driven app. The presenter uses a compact JavaScript approach to lock cells so users cannot edit certain values directly in the grid. Consequently, the clip focuses on making selected cells read-only while leaving the rest of the subgrid editable. This simple demonstration aims to help makers enforce business rules without forcing users to open each record.


What the Video Shows

First, the presenter explains why makers sometimes need cell-level control: for example, preventing edits to a field when a record reaches a closed status or when the logged-in user lacks permission. Next, he shows a small script applied to the grid that visually locks and disables targeted cells. In addition, the video highlights common scenarios such as locking system-controlled fields or making rows read-only based on status. As a result, viewers can see inline editing preserved for allowed fields while protected cells remain off-limits.


How the Technique Works

In the clip, the approach relies on the editable grid experience inside a model-driven app and on client-side logic to decide which cells should be disabled. The presenter points out that modern Microsoft guidance favors the Power Apps grid control over legacy controls, and that conditional behavior usually requires a customizer or component. Therefore, makers commonly implement a Power Apps component framework control, PCF, or a supported grid customizer to render cells as read-only when needed. This lets the grid show visual locks and prevent inline edits while still keeping the grid responsive for permitted edits.


Supported Path and Compatibility

Microsoft’s roadmap suggests makers move to the Power Apps grid control, since the older Editable Grid control is deprecated and will not receive new enhancements. Consequently, the recommended extensibility route is a grid customizer implemented via PCF, which can inspect each row and decide how to render a cell. The presenter’s JavaScript technique works for many scenarios, but it is important to align client-side customizations with supported APIs and the platform’s upgrade path. Thus, using supported customizers reduces future breakage when the platform evolves.


Tradeoffs to Consider

Choosing a client-side script or a PCF customizer involves tradeoffs between speed of delivery and long-term maintainability. On one hand, a quick script can solve an immediate need with little overhead, so teams can deliver visible results fast. On the other hand, scripts that bypass supported patterns risk breaking when Microsoft updates the grid framework, which increases maintenance costs. Therefore, teams must weigh short-term convenience against the durability of a solution built on supported extensibility.


Challenges and Risks

Client-side disabling has limitations: it cannot replace server-side validation and may not enforce security in all cases, so server checks in Dataverse remain essential. In addition, performance can degrade if customizations evaluate many rows or complex rules on every render, and accessibility must be preserved so screen readers and keyboard users still have clear cues. Cross-browser behavior and mobile experience also create variability, which means robust testing is necessary before deployment. Consequently, makers should treat client-side controls as part of a layered approach rather than the sole safeguard.


Practical Recommendations

To balance control and supportability, start by defining clear business rules and map them to both client and server checks so that data integrity is enforced regardless of the UI. Then, prefer a PCF-based customizer or the official grid customizer property when possible, because these align with Microsoft's supported pattern and can be reused across views. Moreover, limit the complexity of client-side logic to keep the grid responsive and maintainable, and document the rules so future teams understand the intent. Finally, include accessibility testing and performance profiling in your rollout plan.


Implementation Tips

Test the customization on realistic data volumes and across different user roles to ensure the disabled cells behave correctly under load and security constraints. Also, maintain server-side business rules in Dataverse to prevent unauthorized updates through alternative APIs or integrations. When possible, encapsulate logic into reusable components so the same behavior can be applied to multiple columns, forms, and subgrids without duplicating code. This approach reduces errors and speeds future updates.


Conclusion

The video by Power Tech Speck (Girish Uppal) offers a practical, approachable way to lock cells inside a model-driven app subgrid while preserving inline editing elsewhere. Although the demonstration uses a small JavaScript technique, the broader guidance encourages makers to use the Power Apps grid control and supported customizer paths for long-term reliability. Ultimately, combining client-side UX controls with server-side protections creates a robust, maintainable solution that balances usability and governance.


Model-Driven App - Power Apps: Disable Subgrid Cells Fast

Keywords

disable cells model-driven app, disable subgrid cells, Power Apps disable cell, model-driven app subgrid customization, disable editable subgrid cells, Dynamics 365 disable grid cell, PowerApps subgrid read-only, JavaScript disable subgrid cells