Tree Grid filters as excel use template value

Hi, I have a column in the tree grid that I use the ng-template to translate the value, but in the filter as excel the values appears as not translated and the search uses this value. How can I template the filter so that I can show the values translated.

Thanks

1 Reply

PS Pon Selva Jeganathan Syncfusion Team April 22, 2020 03:32 PM UTC

Hi Cesar Smerling, 
 
Thanks for using Syncfusion ProductsYou can achieve your requirement by using the filterItemTemplate directive of ng-template. Please refer the following code example.  
 
<ejs-treegrid #treegrid [dataSource]='data'  [treeColumnIndex]='0' height='275'[allowFiltering]='true' [filterSettings]="filterSettings"  childMapping='states'  > 
  <e-columns> 
              <e-column field='name'  headerText='name' textAlign='left' width=90   > 
              <ng-template #template let-data  >    
                  hello  {{data.name }} 
              </ng-template>hi  
              <ng-template #filterItemTemplate let-data  > 
                  hello  {{data.name }} 
                  </ng-template> 
             </e-column> 
              <e-column field='area' headerText='area' textAlign='Right' width=150></e-column>                        
              <e-column field='unemployment' headerText='unemployment' textAlign='Right' width=120></e-column> 
              <e-column field='gdp' headerText='gdp' textAlign='Right' width=120></e-column> 
  </e-columns> 
          </ejs-treegrid> 
 
We have also created a sample that can be downloaded from the following link 
 
Regards, 
Pon selva. 


Loader.
Up arrow icon