I have put a subgrid on a form. This is shown or hidden according to a field value on the form.
The onChange code I have on the field works fine, but the same code in the onLoad causes an error.
Xrm.Page.getControl("mysubgrid") is null.
How can I get access to the subgrid control in the onLoad?