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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

template item not working with component

Thread ID:

Created:

Updated:

Platform:

Replies:

140751 Nov 5,2018 02:18 PM UTC Nov 7,2018 05:31 AM UTC React - EJ 2 1
loading
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}>
<ColumnsDirective>
<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'
template={`
<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. 
 
 
 
Regards, 
Madhu Sudhanan P 



CONFIRMATION

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

or the page will be automatically redirected to 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

;