Editable Grid Events in Dynamics 365

Editable Grid support the below JavaScript events for home grid and sub-grids
  • OnRecordSelect
  • OnSave
  • OnChange


  • Event triggers when a single row is selected in the editable grid.
  • This event won’t trigger 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();


  • The 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 method.


The OnSave event occurs before sending the updated information to the server, and when any of the following occurs
  • There is a change in the record selection.
  • The user explicitly triggers a save operation using the editable grid’s save button.
  • The user applies a sort, filter, group, pagination, or navigation operation from the editable grid while there are pending changes

Some important points to consider for the OnSave event:

  • If a user edits multiple columns of the same record in sequence, the OnSave event will only be fired once to ensure optimal performance and form behavior compatibility.
  • Editable grid and the parent form have separate save buttons. Clicking the save button in one will not save changes in the other.
  • Editable grid does not save pending changes when navigation operations are performed outside of its context. If the control has unsaved data, that data may be lost. Consequently, the OnSave event may not fire. For example, this could happen when navigating to a different record using a form lookup field or through the ribbon.
  • Pressing the refresh button in the editable grid causes it to discard any pending changes, and the OnSave event won’t be fired.
  • Editable grid control does not implement an auto-save timer.
  • Editable grid suppresses duplicate detection rules.

Hope this helps.

Happy CRM’ing


One thought on “Editable Grid Events in Dynamics 365

  1. Unknown November 7, 2016 / 4:10 am

    Hello! Actually I've found something about Editable Grid Events and how to use it. I am just a beginner and have tried only microsoft dynamic ax system, which is more easy. So now I'm learning some features of this new one 🙂 Thank you so much for sharing!


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 )

Google photo

You are commenting using your Google 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 )

Connecting to %s