Hello,
I’m trying to do a charAt on a string contained in a cell and display it in another cell (for each rows in my large datatable)
Here is what I’ve tried:
function char(a,b){
return a.charAt(b)
}
In my colum definition:
What I try to do
{
id: "deal",
template: char("19FFSFNEUIT01", 2),
header: [null, "Deal", {content: "selectFilter"}],
width: 50,
sort: "string"
},
I’d like to replace 16FFSFNEUIT01 with the value contained in a cell in another colum? How do I refer to it?
I’ve tried this:
{
id: "deal",
template: char("this.getItem("reference", 2), //where reference is the id of the other colum
header: [null, "Deal", {content: "selectFilter"}],
width: 50,
sort: "string"
},
I’ve also tried to use the math method without any luck so far:
{
id: "deal",
math: "char([$r, reference], 2)", //or "char([$r, :0], 2)"
header: [null, "Deal", {content: "selectFilter"}],
width: 50,
sort: "string"
},
What is the correct way to do it?
Thank you very much