not work rendering different component for rowTemplate

I try to render a different component for rowTemplate and it doesn't work




Result:



4 Replies

RS Rajapandiyan Settu Syncfusion Team September 19, 2022 03:18 PM UTC

Hi Desarrollador,


Thanks for contacting Syncfusion support.


Currently, we are validating the reported query (“not work rendering different component for rowTemplate”) with the provided code example from our side. So, we will update further details on or before Sep 22nd, 2022.


We appreciate your patience until then.


Regards,

Rajapandiyan S



RS Rajapandiyan Settu Syncfusion Team September 22, 2022 12:51 PM UTC

Hi Desarrollador,


Thanks for your patience.


By default, If you render the child component, it will be wrapped with its selector tag. Since this is the behavior of Angular framework. The reported problem is a common requirement and you can resolve this in many ways. Find the below StackOverflow links to achieve this.


https://stackoverflow.com/questions/38716105/angular2-render-a-component-without-its-wrapping-tag

https://stackoverflow.com/questions/52169086/angular2-render-a-component-without-any-wrapping-tag-at-all
https://stackoverflow.com/questions/67747607/render-an-angular-template-without-any-wrapping-tag
https://stackoverflow.com/questions/59008962/angular-8-render-component-without-extra-wrapper-element-in-the-dom


We have used below CSS style on child-component to achieve your requirement.



[app.component.html]

    <ng-template #rowTemplate let-data>

      <child-component style="display: contents"></child-component>

    </ng-template>

 


Sample: https://stackblitz.com/edit/angular-dpprx5-hyv8wn?file=app.component.html

Please get back to us if you need further assistance.

Regards,

Rajapandiyan S



DV Desarrollador V MetGroup September 23, 2022 01:40 PM UTC

Hi Raja Pandiyan S,


Thank you very much. I solve my problem.



SG Suganya Gopinath Syncfusion Team September 23, 2022 07:57 PM UTC

Hi Desarrollador,

We are glad to hear it from you. Please get back to us if you have any other queries. We are happy to help you as always.

Regards,

Suganya Gopinath.


Loader.
Up arrow icon