Literal Column
A literal column is a column that can be used to display a fixed value on the screen without a separate field.
How to create a literal column and set a fixed value
var columns = [
{
name: "LiteralCol",
type: "literal",
width: "100",
header: {
text: "Literal Column"
},
value: "Text"
},
...skip
]
Create a button and set dynamic text through a literal column
You can dynamically change the displayed value of a literal column through styleCallback.
var columns = [
{
name: "LiteralCol",
type: "literal",
width: "150",
header: {
text: "Literal Column",
},
value: "Text",
styleCallback: (grid, dataCell) => {
return { text: dataCell.index.itemIndex + "th button" };
},
renderer: {
type: "button",
},
},
...skip
]