Our pure JavaScript Scheduler component


Post by do thanh tam »

Hi support,
I see that Grid is in a separate license but I just want to use drag and drop feature so I wonder if it's possible to drag event from external source (list of element in a div, for instance) ?
If it's possible, please guide a simple example in Angular

Thank you in advance


Post by mats »

Yes it's definitely possible, and easy. If you want us to write this for you, please see this page for our Professional Services rates: https://www.bryntum.com/services/

Or look at the source of the drag-from-grid demo where you can learn all you need. This should also be helpful: viewtopic.php?p=72912#p72912

Good luck!


Post by do thanh tam »

Hi mats,
Thank you, I got it
Btw, I think it's a great product, we will purchase it however the documentation is rather hard to understand
I suggest you should make a example that will explain how to apply events, methods, config... in the documentation to a actual example then your support works will be reduced
Anyway, thank you for your support


Post by alex.l »

Hi do thanh tam,

Thanks for your response! We will definitely extends our docs: https://github.com/bryntum/support/issues/1302

All best,
Alex

All the best,
Alex


Post by do thanh tam »

Hi support,
Maybe I have the last question for you before deciding to purchase your scheduler product because we don't want to buy separate grid for just this issue
I see that when you use grid it use (grid.getRecordFromElement(context.grabbed)) to get data from grid but how can I get likewise data from list of events of our own because I see that in your example you get only the text (context.eventName = context.grabbed.innerText) ?

Thank you for your support


Post by alex.l »

Hi,

Try this:

scheduler.resolveEventRecord(context.grabbed);

All best,
Alex

All the best,
Alex


Post by do thanh tam »

Hi Alex,
Thank you for your quick response,
I tried it however scheduler.resolveEventRecord(context.grabbed) return null whereas grid.getRecordFromElement(context.grabbed) return data (in dragstart event).
You can test it in Drag from a grid demo

Thank you


Post by Maxim Gorkovsky »

scheduler.resolveEventRecord(element) is meant to be used on the event element which is rendered inside scheduler. If you're dragging smth into scheduler from outside, you should know everything you need about the dragged entity.
Please provide more details on your app (code/screenshots etc) so we could see how can you drag event from external source.


Post by do thanh tam »

Hi Maxim,
Actually I use the same code as in Drag from a grid demo but instead of grid I use my own component, e.g. grid2:

  1. html:
    <ul class="scroll">
    <li class="b-grid-row-2" *ngFor="let vehicle of WD">{{vehicle.name}}</li>
    </ul>
  2. code:
    this._GRService.getWaitingVehicles(this.roType).subscribe(result => {
    this.WD = result;
    });
    An plug this in app component:
    <app-grid-2 [roType]="2"></app-grid-2>

Of course I have every detail of WD in this case, however when I drag how I can get these details?

Thank you


Post by alex.l »

Hi do thanh tam,

If it's your own component, you need to implement the way to get record from the HTML element by your own. The easiest way is to store id property as one of HTML attributes and fetch record with all data using that id.
But that's very depends on your code base.

All best,
Alex

All the best,
Alex


Post Reply