Microsoft Dynamics CRM

{QUICK TIP}ADD EVENTS TO SUBGRID ON LOAD AND SUBGRID CLIENT OBJECT MODEL IN CRM 2015 UPDATE 1

I have been going through the main features and see variety of blogs already available on various new features coming with Dynamics CRM 2015 Update 1. I found this useful bit of information in Pre-release documentation and sense it is

definitely a hidden gem which was quite needed scripting for Sub-grids:

Subgrid Client object model

The diagram below shows the objects you can access from a subgrid in a form.

So, basically Microsoft Dynamics team had come up with Object model for Subgrids:

clip_image001

Document above referred from MSDN Pre-release content.

It adds a much needed OnLoad event as described in below text:

Subgrid OnLoad event

Subgrids load asynchronously from the form so you cannot reliably get access to the data in the subgrid in the form OnLoad event. But you can set an event handler for the OnLoad event of the subgrid.

This event will occur each time the data in the grid is refreshed, this includes when users sort the columns of a the grid.

There is no user interface to add new event handlers for this event, so you must use code in another event, typically the form OnLoad event to use the GridControl.addOnLoad method

to add event handlers to this event. Use the GridControl.removeOnLoad method to remove event handlers for this event.

More documentation can be found here: https://msdn.microsoft.com/en-us/library/dn932137.aspx#BKMK_SubgridObjectModel

As this is pre-release documentation, some of it can change.

Hope it helps!

Advertisements

1 thought on “{QUICK TIP}ADD EVENTS TO SUBGRID ON LOAD AND SUBGRID CLIENT OBJECT MODEL IN CRM 2015 UPDATE 1”

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