0
votes

I have a winform application that contain a radgridview. Only one cell is set to enable editing. The remaining cells are read only. I have several radgridview event handle that perform different computation. When I'm editing a cell and hit the tab key it jump to the next cell(perfect). My problem is when I hit the "Enter" key, it throw a sort of infinite loop error. How can I disable the "Enter" key or change the behavior to mimic the tab key function? I try the below but it doesn't catch the "Enter" key action. I was reading that the enter key triggers functionality in our Grid (end edit, move to next row, etc.),

     private void radGridView1_KeyDown(object sender, KeyEventArgs e)
    {
        if (e.KeyCode == Keys.Enter)
        {
            e.SuppressKeyPress = true;

        }
    }
1
are you familiar with the e.Handled = true; method - MethodMan
check this link out if you are wanting to use Enter Key to tab to next cell - morecoding.wordpress.com/2012/06/26/… - MethodMan
I tried the e.Handled = true and that didn't work. It seem like the Enter key doesn't even trigger the KeyDown event. - zXSwordXz
do a google search on KeyDown event and Return key as Tab Key.. there are actually lots of different working examples on how to get this to work online - MethodMan

1 Answers

0
votes

I was able to solve the problem by re-coding my codes. I had two cell value that get updated on the CellValueChanged event. I move the updated code to the CellEditEnd event.