This is reproducible in a hierarchical scenario. The nested gridview loses its selection when its parent row is scrolled out of the viewport.
Currently VQCV caches all the items once they are loaded. In this way the data virtaulization functions only through the first bottom-most item scrolling. The idea behind this item is to make this behavior optional by introducing an alternative mode.
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; } }
Currently, if the value set to the RowHeight of RadGridView is lower than the Height of the highest cell(or the Height of a Hierarchy defined), it will not be respected. Provide an option the RowHeight to have greater weight than the height of the cell.
By default, the RadGridView will expand its rows to fit whatever the size of the text content. If you have a large amount of text with newlines, it essentially renders the grid unusable in this state. The thread http://www.telerik.com/forums/limit-row-height suggests two workaround: 1) using a converter to remove newlines- this is a bad solution because it means the binding on the column must be one-way. 2) Applying styling to the grid's textblock- also not great because its non-obvious and requires a lot of boilerplate. My suggestion is two properties on the RadGridView: MaxRowHeight and MultilineRowContentBehavior. This second property would determine what happens when a row has multiline content and would take an enumeration: SizeHeightToContent- the current behavior. SingleLineExpandOnEdit- when displaying, shows only a single line of the multiline content. When editing, expands the TextBox to fit the content. SingleLine- displays and edits the content in a single line.
workaround is to override the OnInitialized of the custom column: protected override void OnInitialized(EventArgs e) {/* //if XAML assemblies Theme theme = StyleManager.GetTheme(this); Type themeType = null; if (theme != null) { themeType = theme.GetType(); } this.DefaultStyleKey = new ThemeResourceKey() { ElementType = typeof(Telerik.Windows.Controls.GridViewColumn), ThemeType = themeType };*/ }
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; } }
Will be nice to have this feature. I have a solution from support by replacing " with *. But it's the way search should work. Click on link and go to Wildcard *: Searching for Unknown Strings section. https://www.howtogeek.com/school/learning-windows-search/lesson4/