Focus unexpectedly leaves C1DataGrid when holding ← or → arrow key (.NET 4.8, W

Posted by: sebastian-jn.k on 30 September 2025, 7:47 am EST

    • Post Options:
    • Link

    Posted 30 September 2025, 7:47 am EST - Updated 30 September 2025, 7:51 am EST

    C1.WPF.DataGrid.4.6.2 (4.6.20251.877)

    Dear ComponentOne Support Team,

    We are using the C1DataGrid in a WPF application based on .NET Framework 4.8 and have encountered an issue when navigating with the left and right arrow keys (← and →).

    Issue:

    When holding down one of the horizontal arrow keys (← or →), the keyboard focus unexpectedly leaves the C1DataGrid, even though the user is still navigating within valid cells.

    This behavior only occurs when the key is held down continuously. A single key press behaves as expected.

    Sample Project: FocusTest.zip

    We have attached a sample project that demonstrates the issue clearly.

    In the sample, you can use the arrow keys to navigate through the grid.

    If you hold the right arrow key, the focus will unexpectedly leave the grid after a few cells.

    Holding the left arrow key can also cause the focus to leave the grid, but it occurs less consistently than with the right arrow key.

    Questions:

    Is there any recommended way to prevent focus from leaving the C1DataGrid when holding a horizontal arrow key?

    Is this behavior known or documented in specific versions?

    Are there any suggested workarounds, settings, or updates that address this issue?

    We appreciate your support and look forward to your response.

    Best regard from germany.

  • Posted 1 October 2025, 10:07 am EST

    Hi Sebastian,

    Apologies for the delayed response.

    Thank you for sharing the sample project. We were able to observe the behavior you mentioned. We have shared our observations with the development team and will let you know once we receive their feedback.

    Note: The C1DataGrid is a legacy control and has long been replaced by C1FlexGrid. If this issue is confirmed as a bug, we cannot guarantee as of yet that it will be fixed. So, our recommendation is to migrate to C1FlexGrid, which is actively supported and continues to receive regular feature updates and bug fixes.

    [Internal Tracking ID: C1XAML-38747]

    Best Regards,

    Kartik

  • Posted 3 October 2025, 1:05 am EST

    Hi Sebastian,

    As per the development team, this appears to be a bug. They will investigate further on this and we will keep you updated. In the meantime, they have provided a workaround for this issue by handling the KeyDown event of the C1DataGrid. Please see the updated sample project for reference.

    FocusTest_Workaround.zip

    Best Regards,

    Kartik

  • Posted 10 October 2025, 3:14 am EST

    Thank you for providing the sample project. Unfortunately, scrolling up and down in the grid now causes a loss of focus.

    I’ve extended the workaround to handle both “Up” and “Down” and attached the revised example here.

    FocusTest_Workaround.zip

    Thanks for your help.

    Best regards from Germany,

    Sebastian

Need extra support?

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

Learn More

Forum Channels