kendo-angular icon indicating copy to clipboard operation
kendo-angular copied to clipboard

[Grid] [TreeList] undesired behavior when reordering columns and using virtual columns

Open svetq opened this issue 3 years ago • 10 comments

Describe the bug When using virtual columns where some of them are grouped and can be reordered, then if you try to reorder the columns of a group the headers of the columns will be no longer proper.

To Reproduce Please see the following example: https://stackblitz.com/edit/angular-vyebsk-zknxs2?file=app/app.component.ts

Try to reorder the columns of a grouped column to observe the issue.

svetq avatar Mar 22 '21 08:03 svetq

Currently working workaround is to recreate grid or treelist in columnReorder callback method. I used ngIf and boolean flag which value I set to false and after 300ms timeout back to true

prydzewski2 avatar Mar 22 '21 09:03 prydzewski2

Not sure how great a workaround this is but to get around the issue we tweak the width of the column to force a change and then restore it.

  public onColumnReorder(event: ColumnReorderEvent): void {
    const columns = this.gridColumns.value;
    columns[event.newIndex].width += 1;
    this.gridColumns.next(columns);    
    setTimeout(() => {
      columns[event.newIndex].width -= 1;
      this.gridColumns.next(columns);
    });
  }

gareth-ferretsoftware avatar Nov 15 '21 20:11 gareth-ferretsoftware

We've been on a slow burn implementation of this grid. I wrote the code for it in November of 2020 but we didn't start testing it till April of 2021. The testers found this bug then but I haven't been back to fix it till now. Now I see that it's been open for almost a year. It would be nice to see this fixed but @gareth-ferretsoftware's workaround worked for me.

ceby-gannetflemming avatar Feb 18 '22 13:02 ceby-gannetflemming

Having the same issue. Would be nice to have this fixed instead of having to use a workaround.

flogy avatar Aug 15 '22 08:08 flogy

Still an issue in 11.3.0.

flogy avatar May 15 '23 13:05 flogy

I also stumble upon this issue, any update? Workaround from @gareth-ferretsoftware works well for now thanks but Is that something that can be recommended or is there any other more robust workaround?

karolkolodziej avatar Jul 31 '23 12:07 karolkolodziej

Why this still is not fixed? We are using the latest version of kendo and I noticed the same and ended up commenting here.

irowbin avatar Sep 22 '23 10:09 irowbin

Could someone provide us with updated status of the issue and hopefully ETA for the fix? @gareth-ferretsoftware workaround seems to work well, but I'd still like to see more robust workaround from the team. @tsvetomir perhaps you could take a look at the issue?

bm64 avatar Nov 20 '23 14:11 bm64

The issue is not fixed yet, sorry! We're reviewing it and will post an update with an ETA.

tsvetomir avatar Nov 21 '23 15:11 tsvetomir

Hi Team, Let us know once the issue is fixed or is part of any planned release.

shivambindal93 avatar Dec 12 '23 06:12 shivambindal93