The cell content gets clipped when the width of the previous column changes at runtime. This happens in the Windows11 and Office2019 themes (possibly in others) and only if the clipped cell is position before the right frozen columns area.
To work this around, you can call the Rebind() method of RadGridView, after the column width changes.
Arrow keys (up and down) don't scroll the first row which is outside of the viewport. One way to reproduce this is to scroll down, then select the topmost visible row and press the Up arrow key in order to select the row above. This should scroll the view a bit up in order to see the previous row which is now selected.
Currently, this doesn't work when using a custom implementation of the GridViewCell class.
The issue is reproducible when GroupRenderMode is set to Flat.
To work this around, you can manually scroll to the row.
public MainWindow()
{
InitializeComponent();
this.gridView.AddHandler(RadGridView.KeyUpEvent, new KeyEventHandler(OnGridViewKeyUp), true);
}
private void OnGridViewKeyUp(object? sender, System.Windows.Input.KeyEventArgs e)
{
if (e.Key == Key.Up || e.Key == Key.Down)
{
Dispatcher.BeginInvoke(new Action(() =>
{
var currentCell = gridView.CurrentCell;
var row = currentCell.ParentRow;
// Since the VisualOffset proeprty is protected and you are already inheriting the GridViewRow class, you can just expose it through an extra property in the CustomGridViewRow, instead of using reflection like in this example.
var visualOffsetPropInfo = typeof(Visual).GetProperty("VisualOffset", System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.NonPublic);
var offset = (Vector)visualOffsetPropInfo.GetValue(row);
if (offset.Y < 0)
{
row.BringIntoView();
}
}));
}
}
InvalidCastException is thrown when the DropIndicatorThickness property of the GridViewHeaderCell is set. Or whenever the DropIndicatorBrush property is accessed. This happens when using the Windows 7 theme. Also, the EnableColumnVirtualization property should be set to False.
System.InvalidCastException: 'Unable to cast object of type 'System.Windows.Media.LinearGradientBrush' to type 'System.Windows.Media.SolidColorBrush'.'
To work this around, you can use an implicit style targeting the GridViewHeaderCell in order to set its DropIndicatorBrush to a SolidColorBrush value.
<telerik:RadGridView.Resources>
<Style TargetType="telerik:GridViewHeaderCell">
<Setter Property="DropIndicatorBrush" Value="White" />
<Setter Property="DropIndicatorThickness" Value="10" />
</Style>
</telerik:RadGridView.Resources>
Column groups may disappear when the RadGridView control is hosted in a TabItem of TabControl. These column groups can disappear when new GridViewColumnGroup instances are created.
Furthermore, resizing a column of RadGridView will result in a NullReferenceException.
To work this around, set the EnableColumnGroupsVirtualization property of RadGridView to False.
In the Office2019 theme, the RadGridView's ScrollBar elements should have transparent background by design. This is the track's background shown behind the thumb element that allows drag-to-scroll. Currently, the ScrollBars have a gray background.
To work this around, you can define an implicit Style in the App.xaml that targets the GridViewScrollViewer control. Then, set its Background property.
<Application.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="/Telerik.Windows.Themes.Office2019;component/Themes/System.Windows.xaml"/>
<ResourceDictionary Source="/Telerik.Windows.Themes.Office2019;component/Themes/Telerik.Windows.Controls.xaml"/>
<ResourceDictionary Source="/Telerik.Windows.Themes.Office2019;component/Themes/Telerik.Windows.Controls.Input.xaml"/>
<ResourceDictionary Source="/Telerik.Windows.Themes.Office2019;component/Themes/Telerik.Windows.Controls.GridView.xaml"/>
</ResourceDictionary.MergedDictionaries>
<Style TargetType="telerik:GridViewScrollViewer" BasedOn="{StaticResource GridViewScrollViewerStyle}">
<Setter Property="Background" Value="Transparent"/>
</Style>
</ResourceDictionary>
</Application.Resources>