Prevent Column reorder without preventing grouping

Posted by: ewurzer on 24 June 2021, 3:04 pm EST

    • Post Options:
    • Link

    Posted 24 June 2021, 3:04 pm EST

    We’ve got a grid using the group panel but i’d like to disable column reordering. I’ve been able to disable column re-ordering via allowDragging, but this also prevents dragging the column header to the group panel.

    Is there a solution that allows dragging to the group panel but prevents column re-ordering?

  • Posted 25 June 2021, 8:42 am EST

    Hi Erik,

    Yes, you can prevent the columns from re-ordering. You need to handle the draggingColumnOver event of the FlexGrid and cancel this event so that the column cannot be dropped:

    theGrid.draggingColumnOver.addHandler((s, e) => {
      e.cancel = true;
    });
    

    You can refer to the sample link below for reference:

    https://stackblitz.com/edit/js-zbxcf8

    Regards,

    Ashwin

Need extra support?

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

Learn More

Forum Channels