Unplanned
Last Updated: 26 Aug 2025 14:24 by Martin Ivanov
Martin Ivanov
Created on: 26 Aug 2025 14:24
Category: PropertyGrid
Type: Bug Report
0
PropertyGrid: Pressing Enter key when a field editor is focused scrolls to the top if the vertical scrollbar is displayed and the properties are grouped

Pressing the Enter key when a field editor is focused will scroll the vertical scrollbar to the topmost offset. This is reproducible when the properties are grouped. Also, the RenderMode should be set to Flat.

To work this around, change the RenderMode setting to Hierarchical right before the Enter key logic is executed and then return it back to Flat after some time.

private void RadPropertyGrid_PreviewKeyDown(object sender, System.Windows.Input.KeyEventArgs e)
{
    var propertyGrid = (RadPropertyGrid)sender;
    var currentMode = propertyGrid1.RenderMode;
    propertyGrid.RenderMode = RenderMode.Hierarchical;

    Dispatcher.BeginInvoke(new Action(() =>
    {
        propertyGrid.RenderMode = currentMode;
    }));
}

0 comments