Wijmo cell drag and drop

Posted by: vijayakumar on 3 April 2020, 1:37 am EST

  • Posted 3 April 2020, 1:37 am EST

    Hi,
    Actually I need to drag an element of wijmo cell and drop into its upcoming horizontal cell(not row or column dragging. I need especially cell). Can you provide a sample code for Angular ?
  • Replied 5 April 2020, 4:05 pm EST

    Hi Vijay,

    To drag and drop the cells, first you will need to make the cells draggable by using the formatItem event and set the cell's draggable property to true. Then, you may handle the various drag events on the hostElement of the FlexGrid. Please refer to the sample link below for reference:

    https://stackblitz.com/edit/angular-acxr7g

    Regards,
    Ashwin
  • Replied 19 May 2020, 9:30 pm EST

    Hi Ashwin.

    Thanks for the reply. It works good. But we are facing another issue. We are using (initialized) for the drag and drop. After using (initialized), the grid automatically scrolls to top after every reloads of collectionview Can you suggest any sample code?
  • Replied 20 May 2020, 4:28 pm EST

    Hi Vijay,

    Can you let us know how you are updating the CollectionView. If you are assigning a new itemsSource then this is an expected behavior because the grid will be re-created with the new data and the selection will move to the default value.

    ~regards
  • Replied 20 May 2020, 5:57 pm EST

    Hi Ashwin,
    We are updating the same itemsource. Can you suggest someother way to handle the drag and drop events (without using initialized) event. We are using itemFormatter and also loaded rows. Can we use the drag and drop events in any other ways.(i.e.,) without using initialized.
  • Replied 21 May 2020, 4:04 pm EST

    Hi,

    I am sorry but I was unable to understand your issue properly. What does updating the same itemsSource means? Can you please explain the issue further?
    If you do not wish to use initialized event, you can also use the ngAfterViewInit callback. Get the reference of the grid using ViewChild decorator and call the DragDrop class.

    ~regards
Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels