Few questions I had while thinking about Editable Grid:
- Where can I have editable grid?
- The editable grid control is supported in the homepage grid, form grids and subgrids on the web client, and in dashboards and form grids on the mobile clients.
- Once editable grid is enabled, Are we stuck with it forever, Can I switch to Regular grid if required.
-
Points to note:
- Regular grid is called Read Only Grid,
-
You can Switch between Read-only and Editable grid from Ribbon
- What can be done on Editable Grids (other than editing):
-
Group <NEW>
- The data can be grouped on the Grid view using “Group By” drop down on top of the grid
-
Grouping drop down will display all the fields on the view.
-
Sort
-
Filter <Modified UI Behavior>
-
The filter view you get on the editable grid is more in line with Custom Filter which we have on Read-Only view.
-
- If I migrate from older version of Dynamics CRM will entities support editable grid without any code change?
-
No, as based on the test I did form scripts and Business rules are not working on editable grid. So it might break certain validations.
Form Level Control
Editable in GRID : Fields are editable
- Can I control the edit behavior and lock these fields using client side scripting
-
Seems possible as editable grid supports certain events, methods and properties which can be used to achieve this. I will cover these in details in a later post.
- Events Supported
- OnRecordSelect – Possibly to be used as OnLoad of record to lock the fields or register other scripts.
- OnChange – OnChange of Attribute/Cell property
- OnSave – OnSave of record
- Methods/Properties Supported
- GridControl – To get editable grid control by name
- Grid – GridControl .getGrid() -> Child properties for this are getRows, getSelectedRows, getTotalRecordCount
- GridRow – GridControl.getGrid().getRows()/ GridControl.getGrid().getSelectedRows()
- GridRowData – GridControl.getGrid().getRows()[0].getData();
- GridEntity – GridRowData.getEntity() -> GridRowData.getEntity().getEntityName(), GridRowData.getEntity().getEntityReference(), GridRowData.getEntity().getId()
- GridAttribute – GridRowData.getEntity().getAttribute(“name”) -> GridAttribute.getName(), GridAttribute.getRequiredLevel(), GridAttribute.setRequiredLevel(), GridAttribute.getValue(), GridAttribute.setValue();
-
GridCell – GridCell.clearNotification(), GridCell.setNotification(), GridCell.getDisabled(),GridAttribute.setDisabled(),GridAttribute.getLabel()
- Are Editable fields supported on All Entities and Views
-
On the web client, an entity will support editable grid if all of the following conditions are true:
- The entity is customizable (IsCustomizable = true)
- The entity is either refreshed (IsAIRUpdated = true) or a custom entity (IsCustomEntity = true)
- The entity is not a child entity (IsChildEntity = false)
- Dynamics 365 mobile client, an entity will support editable grid if the entity can be displayed in the mobile client’s site map.
- Editable grids do not support roll up associated views (Rollup type = Related).
Reference: https://msdn.microsoft.com/en-us/library/mt788312.aspx