The Editable Grid control is a handy tool within Dynamics CRM that allows users to edit a record in line in a list view without needing to open the form. Although enabling the editable grid is pretty straight-forward, there are some things to know that will help you provide the best experience for your users.

Enabling for the Entire Entity

For the editable grid to work for any scenario, it must be enabled on the entity. To do so, navigate to the entity within the solution and click the “Controls” tab, then click “Add Control” and select “Editable Grid”. Once the editable grid control is added on the entity, you can control which view is shown by default for each device type using the radio buttons. In order for the editable grid to be the default in the Unified Interface, the “Tablet” option needs to be selected. Also, note that the editable grid is not available on phone displays. Enabling for the Entire Entity The radio buttons determine what the default control is, but users can switch the control by clicking “Show As” from the ribbon on the list view. The default should be whichever view the majority of users want to see, but then individual users can use whichever control they prefer. Show As Button

Enabling for Certain Views

Once the editable grid control is added to the entity, you can restrict certain views from being editable by changing the control on the view itself. For each view that you want to keep read-only:

  1. Open the view in the solution.
  2. Click on “Custom Controls”. Note that when the Custom Controls window opens it will already have a default “read-only control” shown, but you need to add the second “Read Only Grid” control.
  3. Click “Add Control” and choose “Read Only Grid”. Select the radio buttons for each device type, then click OK.
  4. Save and publish.

Custom Controls

Note: You can add “Read Only Grid” to a view, but not “Editable Grid”. This means that if you want some views editable and some read-only, you need to enable editable grid on the entire entity first and then restrict the read-only views.

Enabling for Certain Fields

Once the editable grid is enabled at the entity level, you can lock individual fields using JavaScript. This function is added on the “Events” tab on the entity, and the function should run for the event “OnRecordSelect”. Once implemented, when the user clicks on the record in the list view the restricted fields will show a lock symbol and will not be editable. Enabling for Certain Fields One way to do this is to include either a blacklist or a whitelist. A blacklist contains all fields that should be locked and when the JavaScript runs, it checks the list and locks all fields contained in the list. A whitelist is the opposite – it contains all fields that should be editable, and locks any fields that are not on the list. Which method you use will depend on whether there are more fields that should or should not be editable on the entity.

Other Key Things to Know about Editable Grid

  • Fields that are locked on the form will be editable in the grid. If there are fields that the user should not be able to edit, you can lock those fields in the editable grid using JavaScript as outlined in the previous section.
  • Field level security will apply to fields in the editable grid, so only users that have access to edit those fields will be able to do so in the list view.
  • The record count on the bottom of a list view is not visible when using the editable grid.
  • Enabling the editable grid control on the entity only applies to the main grid. To enable sub-grids, add the editable grid control to the sub-grid on the form.

For more information on implementing editable grid, or if you have any comments, please Contact Us and feel free to connect on LinkedIn and Twitter!