I have a HTML data for a column and I want to print it without interpreting the HTML. He is my code
$(function() {
$("#grid").jsGrid({
width: "100%",
height: "400px",
filtering: true,
editing: true,
sorting: true,
paging: true,
data: friends,
fields: [{
name: "Name",
type: "text",
width: 100
},
{
name: "Age",
type: "number",
width: 50
},
{
name: "test",
type: "string",
autoencode: true,
width: 50
},
countries,
{
name: "Cool",
type: "checkbox",
width: 40,
title: "Is Cool",
sorting: false
},
{
type: "control"
}
]
})
})
var friends = [{
Name: "Alan Turing",
Age: 41,
Country: 3,
Cool: true,
test: "<h1>test</h1>",
}, ];
var countries = {
name: "Country",
type: "select",
items: [{
Name: "",
Id: 0
},
{
Name: "United States",
Id: 1
},
],
valueField: "Id",
textField: "Name"
}
<link href="https://cdnjs.cloudflare.com/ajax/libs/jsgrid/1.5.3/jsgrid-theme.min.css" rel="stylesheet" />
<link href="https://cdnjs.cloudflare.com/ajax/libs/jsgrid/1.5.3/jsgrid.css" rel="stylesheet" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jsgrid/1.5.3/jsgrid.min.js"></script>
<div id="grid"></div>
Here the test column displays the html. I want to print