Skip to content

Latest commit

 

History

History
50 lines (34 loc) · 1.77 KB

File metadata and controls

50 lines (34 loc) · 1.77 KB
title Keyboard Navigation
page_title Keyboard Navigation | UI for WinForms Documentation
description Keyboard Navigation
slug winforms/propertygrid/keyboard-navigation
tags keyboard,navigation
published true
position 7
previous_url propertygrid-keyboard-navigation

Keyboard Navigation

RadPropertyGrid allows navigation through its item by using keyboard. Two scenarios are supported by default:

  • Pressing a character will select consequently each item starting with this character

  • Typing more than one character will navigate to the first item matching the typed string

To enable this functionality a single property setting is needed:

{{source=..\SamplesCS\PropertyGrid\PropertyGridKeyboardNavigation.cs region=KeyboardSearchEnabled}} {{source=..\SamplesVB\PropertyGrid\PropertyGridKeyboardNavigation.vb region=KeyboardSearchEnabled}}

radPropertyGrid1.KeyboardSearchEnabled = true;
radPropertyGrid1.KeyboardSearchEnabled = True

{{endregion}}

Another property of interest is the KeyboardSearchResetInterval. It is used to determine what time between keystrokes will be considered as typing. Consequent keystrokes with performed faster than the specified interval will be considered typing and once the time elapses, the matching item (if such) will be selected. Here is how to access this property to change the value of the timer:

{{source=..\SamplesCS\PropertyGrid\PropertyGridKeyboardNavigation.cs region=KeyboardSearchResetInterval}} {{source=..\SamplesVB\PropertyGrid\PropertyGridKeyboardNavigation.vb region=KeyboardSearchResetInterval}}

radPropertyGrid1.KeyboardSearchResetInterval = 200;
radPropertyGrid1.KeyboardSearchResetInterval = 200

{{endregion}}