editTemplate not working for child grid

I am using React functional components and I define custom editTemplate like this

  const nameTemplateComponent = React.useCallback((args: unknown) => {
    return <ComboBoxTemplate args={args} url={API_ROUTES.autocompleteApi} />;
  }, []);


When I use it in Column Directive Component it renders correctly

 <ColumnsDirective>
       <ColumnDirective field="id" headerText="ID" visible={false} isPrimaryKey={true} />
      <ColumnDirective field="name" headerText="Name" editTemplate={nameTemplateComponent} />
 </ColumnsDirective>


But when I try to use it in a child column it does not render and it shows as blank template

[
      {
        field: 'id',
        headerText: 'ID',
        visible: false,
        isPrimaryKey: true,
      },
      {
        field: 'name',
        headerText: 'Name',
        editTemplate: nameTemplateComponent,
      },
 ],


Also when I remove the editTemplate prop the field renders as default EditText and works normally.

How can I use custom component in childGrid column?

 
note: I am trying to use ComboBoxTemplate with custom API call (just like in the example with ref.current.datasource) to populate it when user clicks on column edit.



4 Replies

RR Rajapandi Ravi Syncfusion Team July 18, 2022 12:33 PM UTC

Hi Marac,


Greetings from Syncfusion support


Currently, we are preparing a sample based on your requirement and we will update you the details on or before 20th July 2022. Until then we appreciate your patience.


Regards,

Rajapandi R



RR Rajapandi Ravi Syncfusion Team July 20, 2022 02:10 PM UTC

Hi Marac,


Thanks for your patience


While validating your provided information, we found that the template feature is not working fine with latest version. We have already logged a bug task (Template is not working with childGrid in React) for the reported behavior at our end. At Syncfusion, we are committed to fixing all validated defects (subject to technical feasibility and Product Development Life Cycle ) and will include the defect fix in our upcoming patch release which is expected be rolled out on Aug 10th, 2022.


You can now track the current status of your request, review the proposed resolution timeline, and contact us for any further inquiries through the below link,


Feedback: https://www.syncfusion.com/feedback/35967/columntemplate-is-not-working-with-childgrid-in-react


Regards,

Rajapandi R



RR Rajapandi Ravi Syncfusion Team August 10, 2022 12:32 PM UTC

Hi Marac,


Due to some internal complexities, we could not include the fix for (“Template is not working with childGrid in React”) this issue as promised. We are currently working on it with high priority and will include it in our upcoming weekly patch release scheduled to be rolled out by 17th Aug 2022.


We apologize for the inconvenience caused and appreciate your patience until then.


Regards,

Rajapandi R



RR Rajapandi Ravi Syncfusion Team August 17, 2022 01:26 PM UTC

Hi Marac,


We are glad to announce that our Essential Javascript2 patch release (v20.2.44) has been rolled out successfully and in that release, we have added the fix for the issue - Template is not working with childGrid in React”. So please update your packages to this version to include this fix.


Feedback Link: https://www.syncfusion.com/feedback/35967/columntemplate-is-not-working-with-childgrid-in-react


We thank you for your support and appreciate your patience in waiting for this release. Please get in touch with us if you would require any further assistance.


Regards,

Rajapandi R


Loader.
Up arrow icon