Hi,
In a scenario we require to show grid using DOM through typescript code.
In the first column I wanted to show Image & Name both. I'm not able to find how to access values of Image & Name in template.
const dataSource = [
{name: "Harshit", image: "xyz.png", occupancy: 20},
{name: "Rahul", image: "abc.png", occupancy: 60}
]
this.grid = new Grid({
dataSource: dataSource,
columns: [
{headerText: 'Name', width: 100,
template: 'Here I wanted to show both Image & Name'
},
{ field: 'occupancy', headerText: 'Occupancy', width: 30 }
]
})