Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
155
UltraCombo - Howto prevent from scrolling through rows?
posted

Hi, I have an UltraCombo bound to an UltraGrids cell. While the cell is multiline, my users can edit a good portion of text in the cell. When using the ultracombo the users can select a string from a list of strings. This string will be copied into the cell and the users can edit this text. Now - when the users tries to navigate through the edited text with the arrow keys, he actually navigates through the ultracombos entries and the edited text is replaced by the string selected from the combox in an instant. How can i prevent the ultracombo from scrolling through the rows when hitting arrow keys?

Thanks for all helpful answers.

Parents
No Data
Reply
  • 71886
    Offline posted

    Hello,

    A possible approach to achieve this might be by using the following code sample:

            private void ultraGrid1_KeyDown(object sender, KeyEventArgs e)
            {
                if (ultraGrid1.ActiveCell.Column.Key == "Column 0")
                {
                    if (e.KeyCode == Keys.Down || e.KeyCode == Keys.Up)
                    {
                        e.Handled = true;
                    }
                }
            }
    

    Please feel free to let me know if I misunderstood you or if you have any other questions.

Children