Thread ID: |
Created: |
Updated: |
Platform: |
Replies: |
148182 | Oct 9,2019 10:32 AM UTC | Oct 17,2019 10:19 AM UTC | Angular - EJ 2 | 2 |
![]() |
Tags: Grid |
@Component({
template: `
<div>
<ejs-grid id='Grid' [dataSource]='srcData'(rowDrag)='rowDrag($event)' (rowDrop)='rowDrop($event)' [allowRowDragAndDrop]="true"
[rowDropSettings]="srcDropOptions" [selectionSettings]="selectionOptions">
<e-columns>
. . . . . . . .
. . . . . . . .
</e-columns>
</ejs-grid>
</div>
<ejs-schedule #scheduleObj id='Schedule' [selectedDate]='selectedDate' [views]='views' [eventSettings]='eventSettings'></ejs-schedule>`
})
export class AppComponent {
public srcDropOptions = { targetID: 'Schedule' }; // you have to set the targetID to reach your destination from grid.
@ViewChild('scheduleObj')
public scheduleObj: ScheduleComponent;
rowDrop(args: any){
this.scheduleObj.addEvent(args.data);
args.cancel = false;
}
rowDrag(args: any) {
args.cancel = true;
}
} |
This post will be permanently deleted. Are you sure you want to continue?
Sorry, An error occured while processing your request. Please try again later.
This page will automatically be redirected to the sign-in page in 10 seconds.