datatable hide text in specific column

Hi, I have very simple datatable where one column should be hidden values in way like ************. In last column there toggle button show/hide which should transform hidden text. Is there exist some API function to make it simple?

Hello, @roma

It is possible to define the way data are presented in the column with data template. So it supposed to be two masks, which would switch depending on some parameter.

template(obj, type, value, column, index){
        return column.$applyMask ? "###" : value
      }

To perform a mechanism for switching between templates, you could use Custom Header Content. The idea is that it’s possible to take the standard header element (e.g.masterCheckbox), and create a new header element based on it (with a custom onclick handler that would change some related parameter and trigger data rendering).
In the example below, the mask changes depending on whether the Checkbox checked or unChecked.

Here is the snippet: Code Snippet

nice thank you!