Hi,
please help to set k-selected class on expand/collapse event in treeList (angular 16 app).
By default rows are highlighted on select event (k-selected class applied), but I need to highlight it on expand, collapse, select events.
I was trying to use rowCallback for setting/removing selected class and expand/collapse events for getting selected row id, but currently several rows are staying selected at the same time when should be selected only one (from the last action). Am I missing something, or is there a better approach?
rowCallback = (context) => {
return this.zone.run(() => {
if (context.dataItem.id === this.selectedNodeId) {
return {
'k-selected': true
}
}
else if (context.dataItem.id === this.previousSelectedNodeId) {
return {
'k-selected': false
}
}
});
}onAction(e) {
this.zone.run(() => {
const row = this.treeList.view.data.find(dataItem => dataItem.data.id === e.dataItem.id);
if (row) {
this.previousSelectedNodeId = this.selectedNodeId;
this.selectedNodeId = row.data.id;
}
});
}
<kendo-treelist #treeList kendoTreeListExpandable kendoTreeListSelectable
[data]="(loadNodes$ | async)"
[fetchChildren]="fetchChildren"
[hasChildren]="hasChildren"
(selectionChange)="onSelectionChange($event)"
[rowClass]="rowCallback"
(expand)="onAction($event)"
(collapse)="onAction($event)">
Hi Members,
I have been trying to achieve drag and drop between Kendo Grid to Kendo Tree and vice versa but unable to find a feasible solution.
Is it possible to do so, if yes then can you please let me share some example of if someone has implemented something similar.
By default i think it doesn't support dragging and dropping from Kendo Angular Tree Control to Kendo Angular Grid Control
I have the following situation, a component with treelist where the column receives an array by ngTemplate referencing the field.
<kendo-treelist-column
*ngIf="!isHidden('progress')"
field="progress"
title="Progress"
[width]="320">
<ng-template kendoTreeListCellTemplate let-dataItem let-group="cellContext">
<app-okrprogress-bar
[showButtonOk]="true"
[value]="dataItem.progress.slice(-1)[0].value"
[valuePercentagel]="dataItem.progress.slice(-1)[0].value"
[showSlider]="!dataItem.contents ? true : false"
[showValue]="dataItem.typeProgress == 'Values' ? true : false"
[showChecbox]="dataItem.typeProgress == 'Boolean' ? true : false"
[stepSlider]="dataItem.typeProgress"
[viewValue]="dataItem?.values"
(newPercentageActive)="
changePercentage($event, group.viewItem.parent.data, dataItem)
"></app-okrprogress-bar>
</ng-template>
</kendo-treelist-column>
Now I have to export this column in excel, but the field only waits for a simple variable or objects.
<kendo-treelist-excel>
<kendo-excelexport-column fild="keyName" title="Objective"></kendo-excelexport-column>
<kendo-excelexport-column fild="progress.slice(-1)[0].value" title="Progress"></kendo-excelexport-column>
<kendo-excelexport-column fild="status.status" title="Status"></kendo-excelexport-column>
</kendo-treelist-excel>
I did some tests of different calling modes but none of the results were effective.
This is the interface:
interface ObjectiveResult {
keyName: string;
progress: Progress[];
status?: Status;
}
interface Progress {
value: number;
date: Date;
}
interface Status {
name: string;
color: string;
}
Current results:
Hi,
Is there currently a way to merge the adjacent cells together if they have the same text content?
If not, will it be planned at some point?
Best regards
Ahmad Al Edlbi
Hi,
I have the scenario where I have to implement a three-layered master-detail as shown in the snapshot.
Is there any possibility of exporting?
Thanks in advance.