Base solution for your next web application
Starts in:
01 DAYS
01 HRS
01 MIN
01 SEC
Open Closed

Formatting sensitive data column (e.g. passwords) in Datatables #8322


User avatar
0
dev1_premierpoint created

Is there any easy way in the Datatables grid to format a column's display to handle sensitive data type fields? Ideally, would display the column value in stars (*) and then have a eyeball type of control to click on to show the actual value.


2 Answer(s)
  • User Avatar
    0
    maliming created
    Support Team

    You can refer to this example. https://datatables.net/examples/ajax/null_data_source.html

    columnDefs: [
    	{
    		targets: 1,
    		data: "mypassword",
    		render: function (data, type, row) {
    			//store the data(mypassword)
    			return "*****";
    		}
    	}
    ]
    

    Then you can change the contents of the column based on the event. This is a simple idea

  • User Avatar
    0
    ismcagdas created
    Support Team

    This issue is closed because of no recent activity. Please open a new issue if you are still having this problem.