onRenderCell(args: RenderCellEventArgs): void {
if (args.element.classList.contains('e-work-cells')) {
// RenderCell event has the groupIndex in it’s parameter which help us to get the resource details
by calling getResourceByIndex method.
let resource: ResourceDetails = this.scheduleObj.getResourcesByIndex(args.groupIndex);
console.log(resource);
}
}
|
onRenderCell(args: RenderCellEventArgs): void {
if (args.element.classList.contains("e-work-cells") || args.element.classList.contains("e-work-hours")) {
let resourceIndex: number = args.groupIndex;
console.log('index : ' + resourceIndex);
let resource1: ResourceDetails = this.scheduleObj.getResourcesByIndex(args.groupIndex);
console.log("Method 1 : " + resource1);
let resource2: ResourceDetails = this.scheduleObj.getResourcesByIndex(
this.scheduleObj.getCellDetails(args.element).groupIndex
);
console.log("Method 2 : " + resource2);
}
} |