Dynamics CRM 2016 Archives - Microsoft Dynamics 365 Blog http://microsoftdynamics.in/category/dynamics-crm-2016/ Microsoft Dynamics CRM . Microsoft Power Platform Mon, 21 Dec 2020 13:02:46 +0000 en-US hourly 1 https://wordpress.org/?v=6.5.5 https://i0.wp.com/microsoftdynamics.in/wp-content/uploads/2020/04/cropped-Microsoftdynamics365-blogs.png?fit=32%2C32 Dynamics CRM 2016 Archives - Microsoft Dynamics 365 Blog http://microsoftdynamics.in/category/dynamics-crm-2016/ 32 32 176351444 Get Subgrid Information from the PCF Context http://microsoftdynamics.in/2020/12/21/get-subgrid-information-from-the-pcf-context/ Mon, 21 Dec 2020 13:02:46 +0000 https://www.inogic.com/blog/?p=26078 Introduction Recently we were working on a PCF dataset control that can be configured on the Home grid as well as on the subgrid. So while developing the control there were few queries such as what data can we get from the context object regarding the Subgrid. For example, the Subgird label, View ID, Relationship...

The post Get Subgrid Information from the PCF Context appeared first on Microsoft Dynamics 365 Blog.

]]>
Introduction

Recently we were working on a PCF dataset control that can be configured on the Home grid as well as on the subgrid. So while developing the control there were few queries such as what data can we get from the context object regarding the Subgrid. For example, the Subgird label, View ID, Relationship Name for which the Subgird is configured, whether the auto-expand property is true or not, etc.

For finding out I used my developer tool and then used it to check the information that we get in the context for the dataset.

In ‘context.navigation._customControlProperties’ we get all the information regarding the Subgird as shown in the below screenshot.

Get Subgrid Information from the PCF Context

In ‘context.navigation._customControlProperties.descriptor’ you will get to know some useful information which you can use for control like

Get Subgrid Information from the PCF Context

Apart from the above-mentioned information, you can get many more details like whether the auto-expand is enabled which can be used for control styling, etc.

Get Subgrid Information from the PCF Context

You can know whether the control is configured on the Home grid or subgrid by following this blog.

Conclusion

Thus, as explained above, we can get additional information regarding the subgrid using the context object provided by the PCF control.

Go to Source and hit them a thumps up

The post Get Subgrid Information from the PCF Context appeared first on Microsoft Dynamics 365 Blog.

]]>
4358