1. Run the sample application. 2. Scroll to the last item. 3. Begin to resize the window. The direction is irrelevant. Only the horizontal scrollbar needs to be visible. 4. Observe that in the beginning of the resizing, the scrollbar auto scrolls upwards a little and the last item is half hidden.
A workaround for the issue is to use RadObservableCollection as a source collection. Before the items are added to it, call the its SuspendNotifications method. Respectively, after that call the ResumeNotifications one. Another approach would be to populate the items through the AddRange method of the collection.
A possible workaround is to predefine the CellTemplate of the column as well.
As a temporary workaround, the following custom keyboard command provider can be used: public class CustomKeyboardCommandProvider : DefaultKeyboardCommandProvider { private GridViewDataControl parentGrid; public CustomKeyboardCommandProvider(GridViewDataControl grid) : base(grid) { this.parentGrid = grid; } public override IEnumerable<ICommand> ProvideCommandsForKey(Key key) { List<ICommand> commandsToExecute = base.ProvideCommandsForKey(key).ToList(); if (key == Key.Enter) { commandsToExecute.Clear(); commandsToExecute.Add(RadGridViewCommands.CommitEdit); commandsToExecute.Add(RadGridViewCommands.BeginEdit); commandsToExecute.Add(RadGridViewCommands.MoveDown); } return commandsToExecute; } }
workaround: public MainWindow() { InitializeComponent(); this.grid.Loaded += grid_Loaded; } void grid_Loaded(object sender, RoutedEventArgs e) { this.grid.ChildrenOfType<Grid>().FirstOrDefault(x => x.Name == "PART_OuterGrid").RowDefinitions[1].Height = GridLength.Auto; var cells = this.grid.ChildrenOfType<GridViewHeaderCell>(); foreach (GridViewHeaderCell cell in cells) { cell.ChildrenOfType<Grid>().FirstOrDefault(x => x.Name == "PART_OuterGrid").RowDefinitions[1].Height = GridLength.Auto; } }
When setting the VirtualItemCount on refreshing the data source, the scrollbar jumps to the top. If the VirtualItemCount is initially set, the behavior is not reproduced. The workaround is to use the scrolling mechanism of the control and scroll back to the desired item.
Currently, RadGridView's data engine relies on TypeDescriptor.GetProperties, when resolving the set of properties accessible through a certain type. Apparently, this API hides the properteis from the interface, as they are not accessible throught the concrete type.