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

Adding a TOOLTIP in a cell of ejgrid with data from row


I need to add a TOOLTIP in a cell of ejgrid with data from the row. 

example:
    <ej-grid [allowPaging]="true" [allowSorting]="true" [dataSource]="gridData" [allowFiltering]="true"  [(filterSettings)]="filterSet" (rowSelected)="onRowClicked($event)">
    <e-columns>
        <e-column field="title" headerText="Title" width="100"></e-column>
        <e-column field="type" headerText="Type" width="100"></e-column>
        <e-column field="status" headerText="Status" width="100" tooltip=">>>errorMsg<<<<" ></e-column>
    </e-columns>
</ej-grid>

Where errorMsg is a FIELD from the row. I have done many attempt to access the data but seem to be impossible.
There is any way to do this?

If not possible how can we use instead a "onclick" event and show in a alert the "errorMsg" field retrieved from the row ?

Thanks.
marco



2 Replies

MA marco April 13, 2017 12:40 PM UTC

I have found a solution by using a template:

<e-column  headerText="Status" width="100" [template]="templateStatus" ></e-column>   

and in component:

this.templateStatus = `<span title='{{:errorMsg}}'>{{:status}}</span>`

:D

thanks


SA Saravanan Arunachalam Syncfusion Team April 14, 2017 09:47 AM UTC

Hi Marco, 
Thanks for contacting Syncfusion’s support. 
We have already discussed the reported query in the following online documentation link. https://help.syncfusion.com/js/grid/cell#tooltip  
Note: we can’t render the jsrender template directly into an Component.html. So, we suggest you to defining the jsrender template on index.html 
Regards, 
Saravanan A. 


Loader.
Up arrow icon