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
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

template item not working with component

Thread ID:





140751 Nov 5,2018 02:18 PM UTC Nov 7,2018 05:31 AM UTC React - EJ 2 1
Tags: Grid
imam nawawi
Asked On November 5, 2018 02:18 PM UTC

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>

Madhu Sudhanan P [Syncfusion]
Replied On 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 


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon