using grid grouping Caption Template, the group title is wrong

Hi,

 In your document,  the grid group title is html code? How and when to fixed it ?
https://ej2.syncfusion.com/angular/documentation/grid/grouping/#caption-template


1 Reply 1 reply marked as answer

RR Rajapandi Ravi Syncfusion Team April 22, 2021 11:56 AM UTC

Hi lorryl, 

Greetings from syncfusion support 

Based on your query we could understood that you want to remove the HTML tags from the group caption template tooltip of the Grid. You can achieve your requirement of removing the HTML tags from the group caption template tooltip using dataBound event of Grid as demonstrated in the below code snippet, 
 
 
dataBound() { 
    var captionElements: any = []; 
    captionElements = this.grid.element.querySelectorAll( 
      ".e-groupcaption" 
    ); 
    if (captionElements.length) { 
      for (var i = 0; i < captionElements.length; i++) { 
        var text = captionElements[i].innerHTML; 
        var regEx = /(<([^>]+)>)/gi; 
        var tempResult = text.replace(regEx, ""); 
        captionElements[i].title = tempResult; 
      } 
    } 
  } 
 


Screenshot:  

 

Regards,
Rajapandi R 


Marked as answer
Loader.
Up arrow icon