Unplanned
Last Updated: 17 Jan 2023 12:51 by ADMIN
Daniel
Created on: 17 Jan 2023 12:43
Category: GridView
Type: Bug Report
1
RadGridView: ComboBoxColumn is skipped from navigation when calling BeginEdit() of the same column

In this case, we have GridViewTextBoxColumn and GridViewComboBoxColumn after it. We want to trigger the edit on the second column at the moment it is navigated with the key arrow navigation. To do that BeginEdit() method is called. However, manually calling this method will trigger key events on the editor inside the GridViewComboBoxColumn which will bubble to the parent and move the current cell to the next column (skipped the GridViewComboBoxColumn )

This behavior could be workaround by delaying the execution of the BeginEdit() method.

public class CustomGridBehavior : BaseGridBehavior
{
    Timer timer = new Timer();        
    public override bool ProcessKey(KeyEventArgs keys)
    {
        var result = base.ProcessKey(keys);
        if((keys.KeyCode == Keys.Left || keys.KeyCode == Keys.Right) && this.GridControl.CurrentColumn is GridViewComboBoxColumn)
        {
            timer.Interval = 100;
            timer.Tick += Timer_Tick;
            timer.Start();                
        }
        return true;
    }

    private void Timer_Tick(object sender, EventArgs e)
    {
        timer.Stop();
        this.GridControl.BeginEdit();
    }
}

this.radGridView1.GridBehavior = new CustomGridBehavior();

 

1 comment
ADMIN
Dinko | Tech Support Engineer
Posted on: 17 Jan 2023 12:51

Hi Daniel,

Thank you for reporting this. I was able to reproduce this behavior and I can confirm that it is unexpected. Our development team is already aware of this and as soon as this is planned for fixing the status of the item will be changed.

Regards,
Dinko | Tech Support Engineer
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.