<kendo-treelist
class="kendo-treelist"
[kendoTreeListFlatBinding]="data"
#directive="kendoTreeListFlatBinding"
[rowClass]="dynamicClass"
[parentIdField]="parentIdField"
[idField]="idField"
kendoTreeListExpandable
kendoTreeListSelectable
[rowReorderable]="true"
(cellClick)="onCellClick($event)"
[itemKey]="idField"
[(selectedItems)]="selected"
[(expandedKeys)]="expandedIds"
[isExpanded]="isExpanded"
(expand)="onExpand($event)"
(collapse)="onCollapse($event)"
(rowReorder)="onRowReorder($event)"
[loading]="data.length == 0"
>
<kendo-treelist-rowreorder-column [width]="25"></kendo-treelist-rowreorder-column>
<kendo-treelist-column
*ngFor="let column of treeListOptions.columns"
[field]="column.field"
[expandable]="column.expandable"
[title]="column.title"
[width]="column.width">
<ng-template *ngIf="column.ngTemplate" kendoTreeListCellTemplate let-dataItem let-rowIndex="rowIndex">
<!-- Context values will be accessible for column customization on the parent component. -->
<ng-container *ngTemplateOutlet="template; context: { dataItem, rowIndex, column }"></ng-container>
</ng-template>
</kendo-treelist-column>
</kendo-treelist>
Hi,
I am using Kendo Treelist Angular with 'kendoTreeListFlatBinding'. Mock data is also attached. There could be multiple folders and each folder can have multiple templates in it. I want to use row-reorder on my tree-list component.
After enabling rowreorder. I have following scenarios to deal with:
- Template is reordered within the same Folder - Positions of all templates will be changed in this case.
- Template is reordered into some other Folder - Parent id of dragged template and Positions of all templates in target folder will be changed.
- Folder is reordered into some other Folder - parent id of dragged template and its child templates will change and Positions of all templates in target folder will be changed.
But I want to know, if Kendo Treelist provides any build-in event or mechanism through which these changed positions can be handled/accessed and can be sent to backend to save changes in DB afterwords.
Attaching few screenshots and mock data to help you understand the issue.