I am looking for a way to access an UltraDropDown and select a value from it using only the keyboard. For example, lets say we have a simple grid with ID, Name, and Manager. The manager column has an UltraDropDown set as its valuelist (column style is DropDownValidate). When adding a new record I want to be able to type in the ID value, press tab, type in the Name, press tab, then press a special key such as "/" to cause the drop down to open and then use the arrow keys select the manager, the press enter to select it. The goal is to keep the users hands on the keyboard for data entry and not reach to the mouse just to look up the value
I am able to make the drop down popup by catching the KeyPress event, handling the error and then calling the PerformAction(UltraGridAction.ToggleDropDown) event but I cannot figure out how to set focus to the drop drop down list. I have tried simply .Focus method but it doesn't do anything.2
Is this possible?
Hello,
You can add a custom GridKeyActionMapping for when the forward slash key is pressed to toggle the dropdown.
I attached a sample demonstrating this which I fits your requirement. Please review it and let me know if you have any questions.
This seems to work perfectly. Thank you very much.
One question about the sample. What is the included ZeroFilter class for? I could not find a reference in the code where it was used and commenting it out didn't seem to have any detrimental effect on the code working.
Please ignore that class. This sample was used in other areas at one point and I should of removed it.
Let me know if you have any additional questions.