isContentHtml not working for OLAP

Posted by: nipun on 19 June 2018, 2:15 am EST

  • Posted 19 June 2018, 2:15 am EST - Updated 3 October 2022, 10:52 am EST

    Hi,

    I am using wijmo OLAP for reporting in our application. However, we do have HTML content in our fields for which we did enable isContentHtml property. But still, when the underlying flexgrid is drawn it escapes the HTML and shows it as plain text. Below is the snapshot of how the grid is shown with HTML content in it:

    The version we are using is Wijmo Enterprise - v3.409

    Please verify this issue and reply/fix at the earliest.

  • Posted 20 June 2018, 10:22 pm EST

    Hi Nipun,

    We are sorry for the delayed response.

    The isContentHtml only applies to scrollable cells. If you would like to show the HTML content for headers. Please use formatItem event.

    Please refer to following code snippet

    
    pivot.formatItem.addHandler((s,e)=>{
    	if(e.panel.cellType==wijmo.grid.CellType.ColumnHeader||e.panel.cellType==wijmo.grid.CellType.RowHeader){
    		e.cell.innerHTML=e.cell.innerText;
    	}
    });
    
    

    You can also refer to following sample for the same:-

    https://stackblitz.com/edit/js-cjfm3m?file=index.js

    ~Manish

  • Posted 21 June 2018, 4:04 am EST

    Thanks, Manish for clearing that isContentHtml doesn’t work on Header type cells. As a workaround for displaying HTML, I had found a way of using itemFormatter to convert the plain text to HTML.

    Your reply has now helped me understand better insight of issue and to handle it more gracefully.

  • Posted 22 June 2018, 12:07 am EST

    Hi Nipun,

    Thanks for notifying us that the solution provided is helpful.

    Yes, you may also use itemFormatter for the same.

    ~Manish

  • Posted 10 July 2019, 8:46 pm EST - Updated 3 October 2022, 10:53 am EST

    Hi Manish,

    I have the same problem as Nipun. I used the isContentHtml property but it didn’t work.

    However, it can be set like this in this sample. https://www.grapecity.com/wijmo/demos/OLAP/PivotGrid/CustomizeFieldcells/HTMLContent/purejs/slate

    Wijmo Library: 5.20182.500

  • Posted 11 July 2019, 9:22 pm EST

    Hi Hanny,

    In the specified sample, the isContentHtml does not apply on PivotGrid rows and column headers. It is set for PivotField.

    However, the issue has been found as fixed in the latest build (5.20191.615). We recommend you to upgrade to the latest version.

    Please let us know if you face any issues while upgrading.

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels