|
<e-column headerText='Action' width=65>
<ng-template #template let-data>
<button ejs-dropdownbutton [items]= "items" (beforeOpen)='BuildActionBtnItems(data)' content='Clipboard' (select)="onSelect($event)"></button>
</ng-template>
</e-column>
…………….
…………….
…………….
public BuildActionBtnItems(rowItem) {
let items: ItemModel[] = [];
if (rowItem.index === "0") {
items.push(
{ text: this.actionBtnItems[0] },
{ text: this.actionBtnItems[1] }
);
}
if (rowItem.index === "1") {
items.push({ text: this.actionBtnItems[2] });
}
if (rowItem.index === "2") {
items.push({ text: this.actionBtnItems[3] });
} else {
items.push(
{ text: this.actionBtnItems[0] },
{ text: this.actionBtnItems[1] }
);
}
this.items = items;
} |