With the release of CRM 2015 Update 1 we can write supported scripts to get information from the subgrids.
Before CRM Online 2015 Update 1 the only unique method for the subgrid control was refresh.
As an Xrm.Page.ui control, GridControl also has all the standard control methods: getControlType, Label methods, getParent,Visible methods, setFocus, and Notification methods as well as refresh
OnLoad event
Add event handlers to this event to run every time the subgrid refreshes. This includes when users sort the values by clicking the column headings. Use the GridControl.addOnLoad and GridControl.removeOnLoad methods to manage event handlers, usually in the form Onload event.
Example :
Xrm.Page.getControl("Contacts").addOnLoad(<functionname>);
getEntityName
Use this method to get the logical name of the entity data displayed in the grid.
getGrid
Use this method to get access to the Grid available in the GridControl.
getViewSelector
Returns the
View original post 203 more words