简体   繁体   中英

Kendo UI Angular 2 Sortable Methods

How does one use the Methods of Kendo UI for Angular 2's Sortable component?

The documentation doesn't present any specific examples.

Answering for future users.

Import :

import {SortableComponent} from '@progress/kendo-angular-sortable';

Include :

export class ComponentName implements OnInit {

    @ViewChild('sortable') public sortable: SortableComponent;
    ...

}

Call :

public addDataItemFunction() {
    this.sortable.addDataItem('1', 0);
}

"addDataItem" being the Method.

Element :

<kendo-sortable #sortable ...></kendo-sortable>

Hope this helps.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM