Advertisements
Home > Dynamics 365 > Dynamics 365 New Feature – Editable Grid

Dynamics 365 New Feature – Editable Grid

  • Editable grid is a new custom control in Dynamics 365 that provides inline editing capabilities on web and mobile clients
Editable-grid

Editable-grid

  • It can group, sort, and filter data
Editable-grid-grouping-and-filter

Editable-grid-grouping-and-filter

  • Editable grid is supported in below grids on the web client, and in dashboards and form grids on the mobile clients.
    • Homepage grid,
    • Form grids
    • Sub grids
  • It honors the read-only field metadata and field-level security settings.
  • Editable grids also support business rules and form scripting.
  • Editable grids do not support roll up associated views
  • Editable grid can be configured on the entity only if its Customizable

Configure Editable Grid on Account Entity:

  • Go to Customization -> Entities -> Account -> Controls -> Add Control
Add grid

Add grid

  • Adding Look up: We can configure look up field on Editable grid with Search option.
Configure-look-up

Configure-look-up

  • Similarly we can also add  ‘Nested Grid View’ (Only supported for Tablet and Phone clients).

Editable Grid Events:

Editable grid supports the following events

Editable-grid-events

Editable-grid-events

  • OnRecordSelect
    • Event occurs when a single row is selected in the editable grid.
    • This event won’t occur if a user selects different cells in the same row, or selects multiple rows.

// Register this event on ‘onRecordSelect’ event

function gridRowSelect() {

// Read selected rows from editable sub grid
var selectedRows = Xrm.Page.getControl(“subGridAccounts”).getGrid().getSelectedRows();
}

  • OnChange
    • Event occurs when a value is changed in a cell in the editable grid and the cell loses focus.
    • This event can also occur when an attribute value is updated using the setValue
  • OnSave
    • Event occurs, when,
      • There is a change in the record selection.
      • Explicitly triggering a save operation using the editable grid’s save button.
      • Upon sort, filter, group, pagination, or navigation operation from the editable grid while there are pending changes
    • Editable grid suppresses duplicate detection rules up on Save.
    • If a user edits multiple columns of the same record in sequence, the OnSave event will only be fired once
  • Editable grid control does not implement an auto-save timer

Configure Editable Sub Grid:

  • Sub grid on the form can be configured as Editable grid
  • I have a Custom entity ‘Company Accounts’ having 1:N relationship with ‘Accounts’
  • I added a Sub grid ‘subGridAccounts’ on the ‘Company Accounts’ form
  • To make ‘subGridAccounts’ grid as Editable, Double click the grid to open ‘Properties’
  • Add ‘Editable Grid’ Control. You can add Grid events too.
Configure- editable sub-grid

Configure- editable sub-grid

  • Editable Sub Grid looks as below
Sub-grid on form

Sub-grid on form

Refer MSDN for more info.

🙂

Advertisements
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: