I'm trying to link a table with fetchXML to populate a subgrid but it seems to not work. here is the fetchXML i'm using in my javascript code for subgrid onload. I used the XRMtoolbox  to check the xml and I got the desired result.
 
 
 
 fetchXml =  "<fetch version='1' output-format='xml-platform' mapping='logical' distinct='true'>
                                               <entity name='c_dp'><attribute name='c_name'/>
                                                         <link-entity name='c_dt' from='c_relatedtoprogram' to='c_dtpid' link-type='inner'>  
                                                                        <filter type='and' ><condition attribute='c_name' operator='eq' value='"+ Name+"'/></filter>
                                                        </link-entity>
                                               </entity>
                          </fetch>";
                                             
                                                                 control.setFilterXml(fetchXml);
                                                                  control.refresh();