Premium support for our pure JavaScript UI components


Post by rvinayagam »

1. Drag & Drop

Dragging a row(object) from the grid and dropping to a Scheduler is triggered as an HTML drop event(not as a scheduler event), instead of giving the actual resource name and time, it gives x and y coordinate values.

How do we get the dropped object Resource and time?

2. How to we hide the default Event Editor window on double-click event?

Post by mats »

1. Have you made your own drag drop implementation? Or are you referring to our demo with 'drag from grid'?

2. set 'eventEdit' feature to false. https://bryntum.com/docs/scheduler/#Sch ... /EventEdit
features : { 
    eventEdit : false,
    ...

Post by rvinayagam »

1. We are dragging the row from a custom grid(not the bryntum grid) and dropping it on the scheduler through HTML drag-drop implementation.
 
onDragStart(event: any, rowData: any) {
    event.dataTransfer.setData('data', JSON.stringify(rowData));
  }
  
<div (onDrop)="onDrop($event)">
    <scheduler
      #scheduler
      [rowHeight]="50"
      ............
    </scheduler>
      
onDrop(event: any) {
console.log(event); }
      
We get the target element,data and x,y coordinates from the event. Please refer below screenshot
drag-event.JPG
drag-event.JPG (67.93 KiB) Viewed 1667 times
Please let us know how can we get the resource and time out of it.

Post by mats »


Post by rvinayagam »

we are now able to retrieve the resource record and the corresponding time where the event was dropped.
Is there a provision to trigger create new event at that dropped position? Also when we create event we wanted to validate the following

a. Check in the same time where the event is dropped, do we have any other event already present for e.g if we wanted to drop an event at 12 and the event is already present @12 we should not allow the event to be created, as he drags the event to a different timeline the event should be created.

b. In general how do we add validations before an event is created, for e.g. to create a two hour event, in the timeline two hour time-window should be present with no other events within that 2 hours, only then it allows the event to be created

Post by mats »

Simply add a new event to the EventStore?

a) Loop over the records in the EventStore, please see https://bryntum.com/docs/scheduler/#Sch ... duledEvent

b) Have you tried our 'validation' demo? https://bryntum.com/examples/scheduler/validation/

Post by rvinayagam »

We need to implement additional validation on drag and drop events in the scheduler. We found demo for the same in your portal, but need some additional clarification on these, like how the events are restored on false validation scenarios. it would be highly useful if you can share some angular snippet code for the same.

The main problem we are facing is to restore the event back to its original state incase of validation failure.

Post by rvinayagam »

Event Store Update:

During the Initial Load we create all the events and resources and assign to the event & resource store respectively. Later on update of any event for a specific resource, we want the event store to be updated only for the selected resource instead of the entire store. Do we have any code snippet/ Documentation which points to selectively updating the event store.

Event Icon

Within an Event we want to have icons along with sometext, currently it supports fontawesome icons is there a provision for us to load external SVG, PNG icons. We are able to add different context menus, but wanted to associate icons for those as well, again fontawesome is supported, can we add SVG, PNG icons for the same.

Post by pmiklashevich »

Hello @rvinayagam,

Could you please break the questions up by new threads, so it's easy to refer to your questions and others can find a solution if they get stuck with the same problem? How to report a problem or ask for help is described here.

Thanks,
Pavel

Pavlo Miklashevych
Sr. Frontend Developer


Post by rvinayagam »

rvinayagam wrote: Tue May 07, 2019 1:30 pm We need to implement additional validation on drag and drop events in the scheduler. We found demo for the same in your portal, but need some additional clarification on these, like how the events are restored on false validation scenarios. it would be highly useful if you can share some angular snippet code for the same.

The main problem we are facing is to restore the event back to its original state incase of validation failure.
I have created a separate thread for multiple questions. Can you update on this one.

Post Reply