We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

template item not working with component

if i want to use comoponent in the tempalte={}
how can i do ?

because the template just can read html script, i try with <a> and <div> its working.

but when i used <ButtonComponent/> its not working

<GridComponent id='gridcomp' allowSorting={true} contextMenuItems={ this.contextMenuItems } dataSource={queryResult.data} height={380} width={"100%"} editSettings={this.editSettings}>
<ColumnDirective customAttributes={customAttributes} headerText="Name" field='name'></ColumnDirective>
<ColumnDirective customAttributes={customAttributes} headerText="Type" field='type.name'></ColumnDirective>
<ColumnDirective customAttributes={customAttributes} headerText="Email" field='email'></ColumnDirective>
<ColumnDirective customAttributes={customAttributes} headerText="Website" field='website'></ColumnDirective>
<ColumnDirective customAttributes={customAttributes} headerText="Phones" field='phone'></ColumnDirective>
<ColumnDirective customAttributes={customAttributes} width='160'
<ButtonComponent iconCss='bg-icons e-btngrp-watch'></ButtonComponent>
<ContextMenuComponent id='contextmenu' items={ this.menuItems }></ContextMenuComponent>

1 Reply

MS Madhu Sudhanan P Syncfusion Team November 7, 2018 05:31 AM UTC

Thanks for contacting Syncfusion support. 
The template property should be assigned with React functional component. Please go through the below demo, documentation and sample for your reference. 
Madhu Sudhanan P 

Live Chat Icon For mobile
Up arrow icon