Flexgrid - column - click next to the checkbox

Posted by: mary431982 on 29 March 2023, 7:14 pm EST

    • Post Options:
    • Link

    Posted 29 March 2023, 7:14 pm EST

    Hello,

    We have situation, when we click directly into the checkbox (in boolean column) - it changes its value witch is expected, BUTwhen we click once next to the checkbox (inside the cell but outside of the checkbox), and once again next to the checkbox, and THEN click INTO the checkbox - it doesn’t change its value.

    You can see that also on your example: https://www.grapecity.com/wijmo/demos/Grid/Overview/angular

    I added: {{itemsSource.currentItem[‘active’]}} into the html below the grid so you can observe change of the currentItem value of your boolean column Active.

    How can we solve this? That even if user by accident click twice next to the checkbox and then click into the checkbox - that IT changes its value?

    Thanx!!

    Maria

  • Posted 30 March 2023, 5:57 pm EST

    Hi Maria,

    This issue happens, because when the user double clicks just next to the checkbox inside the cell, the flexgrid enters full edit mode, and the changes are not reflected by angular change detection until edit mode is ended. To avoid this issue you can handle the ‘beginningEdit’ event of the flexGrid and end the edit mode manually in such scenarios. Please refer to the following code snippet -

    beginningEdit(s: wjcGrid.FlexGrid, e: wjcGrid.CellEditEndingEventArgs) {
            if (e.getColumn(true).binding == 'active') {
                setTimeout(() => {
                    s.finishEditing();
                })
            }
        }

    You can also refer to the following sample for the same - https://jscodemine.grapecity.com/share/2YuF8ma9akii3Zc2AyvFlw/

    Regards

  • Posted 30 March 2023, 8:57 pm EST

    That’s it! Thanx!!

Need extra support?

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

Learn More

Forum Channels