Transposed Table _getBindingColumn error

Posted by: kamil.skrouba on 15 October 2024, 10:48 am EST

  • Posted 15 October 2024, 10:48 am EST

    Hi,

    After upgrading wijmo from version 5.20231.904 to 5.20241.19, we are encountering issues with TransposedGrid. Maybe you have any idea what’s goin on? The data doesn’t appear when we horizontal scroll, and we receive this error:

     TypeError: Cannot read properties of undefined (reading 'binding')
        at TransposedGrid._getBindingColumn (es5-esm.js:14:6297)
        at _EditHandler._getCustomEditor (es5-esm.js:14:220802)
        at HTMLDivElement.<anonymous> (es5-esm.js:14:87797)
        at _ZoneDelegate.invokeTask (zone.js:398:33)
        at core.mjs:14556:55
        at AsyncStackTaggingZoneSpec.onInvokeTask (core.mjs:14556:36)
        at _ZoneDelegate.invokeTask (zone.js:397:38)
        at Object.onInvokeTask (core.mjs:14869:33)
        at _ZoneDelegate.invokeTask (zone.js:397:38)
        at ZoneImpl.runTask (zone.js:158:47)

    Can it cause a problem that if the data (it’s our @Input()) is changed then in the ngOnChanges we re-create CollectionView?

    Thanks,

  • Posted 16 October 2024, 3:13 am EST - Updated 16 October 2024, 4:46 am EST

    Looks like the problem is with select method.

    @ViewChild('grid', { static: true }) grid!: TransposedGrid;
    
    ... In ngOnInit:
    this.grid.select(-1, -1);

    Do you have any idea how to solve that? Our goal is to not select first cell when we render the grid.

  • Posted 16 October 2024, 5:20 am EST

    Hi Kamil,

    We are unable to replicate the issue on our end. However, if removing the selection using ‘select’ method inside ‘ngOnInit’ method is causing this issue, you can move the selection statement to ‘initialized’ event handler of the grid. Please refer to the following sample for the same - https://stackblitz.com/edit/angular-ivy-zgdddx?file=src%2Fapp%2Fgrid%2Fgrid.component.ts

    In case, if your issue is still not resolved, please share a small sample in which the issue can be replicated, so that we can investigate it on our end and assist you accordingly. You can also modify the above sample to replicate the issue and share it with us.

    Regards

  • Posted 16 October 2024, 9:39 am EST - Updated 17 October 2024, 1:35 am EST

    Hey Vivek, You can’t replicate it… OK so please just comment line 23 and uncomment line 27.

    Then you will see the same issue that we have.

    Also we have ‘this.grid.select(-1, -1);’ in ngOnChanges. Please ask your team to check it.

  • Posted 17 October 2024, 9:00 am EST

    Hi Kamil,

    We have replicated the issue and it seems like unexpected behavior for the transposedGrid control, so we have forwarded this issue to the engineering team for further investigation with internal tracking ID - WJM-35138. We will update you when we have some updates to share from the engineering team.

    For now, you can handle the ‘itemsSourceChanged’ event of the transposedGrid to remove the selection from the grid, it will update grid’s selection each time the grid’s itemSource changes. Here’s the updated sample demonstrating the same - https://stackblitz.com/edit/angular-ivy-tzoxv4?file=src%2Fapp%2Fgrid%2Fgrid.component.ts

    Regards

Need extra support?

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

Learn More

Forum Channels