Microsoft Dynamics CRM 2016 On-premises provides several new capabilities and methods to working with sub grids. Here are two quick tips for using those capabilities!



1. If you want to hide or show a sub grid based on some conditions, you will use the following command to set visibility:


2. If you need interact with the row that is being selected and get some information or populate specific data, CRM 2016 provides new methods that will give the user an option to interact with them. In this example, we are populating an array with the selected row from the grid. The array is a collection of entity references, for example, lookups:

var selectedRowsArray = [];

var selectedRows = Xrm.Page.getControl(“gridname”).getGrid().getSelectedRows();


function (selectedRow, i) {



That’s all for the blog today! You can learn more by checking out The CRM Book, our blog, and this additional resource.

Happy CRM’ing!

Avatar for Joe D365

Joe D365

Joe D365 is a Microsoft Dynamics 365 superhero who runs on pure Dynamics adrenaline. As the face of PowerObjects, Joe D365’s mission is to reveal innovative ways to use Dynamics 365 and bring the application to more businesses and organizations around the world.