You are able to resize columns using the columns gripper. The corresponding group will be automatically resized. We can provide a way to resize the column groups. The columns inside the group will be automatically resized with the group.
The GridViewSelectColumn displays a CheckBox in its header, which selects all rows in the column. If the CheckBox is unchecked, and you click it to check the items, the items get selected/checked. However, the CheckBox doesn't get check until the second click.
This reproduces only when the RadGridView is grouped and also the groups are collapsed so that no data records are visible.
To work this around, you can replace the default CheckBox with a new one in the column's Header. Then, manually select and deselect the items. You can use the CheckBox MouseLeftButtonDown or Checked/Unchecked events. Note that it is important to wrap the CheckBox in the Header, in another control (like a Grid in the example below), in order to avoid the default RadGridView logic to kick-in.
<telerik:GridViewSelectColumn>
<telerik:GridViewSelectColumn.Header>
<Grid>
<CheckBox PreviewMouseLeftButtonDown="CheckBox_PreviewMouseLeftButtonDown"/>
</Grid>
</telerik:GridViewSelectColumn.Header>
</telerik:GridViewSelectColumn>
private void CheckBox_PreviewMouseLeftButtonDown(object sender, System.Windows.Input.MouseButtonEventArgs e)
{
var checkBox = (CheckBox)sender;
if (checkBox.IsChecked.Value)
{
this.GridView.SelectedItems.Clear();
}
else
{
this.GridView.SelectAll();
}
}
When the RadGridView is filtered you can get all items in the data view using the Items collection property of the control. The count can be accessed with the gridView.Items.Count property.
If the RadGridView is grouped and then filtered, the Items.Count no longer returns the correct value. The count doesn't take into account the items that are in collapsed groups. Instead the count contains only the expanded group objects.
To work this around, use the following code instead of gridView.Items.Count.
int count = gridView.Items.OfType<object>().Count();
The selection with the Shift key when SelectionMode=Extended no longer works in the default Nested rendering mode of RadGridView. This reproduces only when the data view is grouped.
To work this around, set the GroupRenderMode property of RadGridView to Flat.
<telerik:RadGridView GroupRenderMode="Flat" />
Exception when resizing column with width set to star and min-width set to 0.
Set the properties to the above and resize a column to 0 and then to the original width -> an exception occurs.
The RadGridView control hangs when the frozen columns are enabled and the application is resized. The exact resizing depends on the screen resolution and the exact new size. This was originally recreated on a monitor with 1600x900 resolution 125% DPI and the application was maximized (resized from restored to full screen size). The issue occurs in the Fluent theme. Also, the FluentPalette.Palette.ScrollBarsMode static property should be set to Normal.
To work this around, you can overrider the MeasureOverride method of RadGridView and add the following code:
public class CustomGridView: RadGridView
{
private static readonly PropertyInfo internalColumnsProp = typeof(GridViewDataControl).GetProperty("InternalColumns", BindingFlags.Instance | BindingFlags.NonPublic);
private static MethodInfo invalidateColumnsMethod;
protected override Size MeasureOverride(Size availableSize)
{
if (EnableRowVirtualization && !double.IsInfinity(availableSize.Height))
{
var internalColumns = internalColumnsProp.GetValue(this);
if (invalidateColumnsMethod == null)
{
invalidateColumnsMethod = internalColumns.GetType().GetMethod("InvalidateColumnWidthsCalculation", BindingFlags.Instance | BindingFlags.NonPublic);
}
invalidateColumnsMethod.Invoke(internalColumns, null);
}
return base.MeasureOverride(availableSize);
}
Currently the filters for the RadGridView only allows 2 filters. It would be very helpful for the default filter popout to have the option to add additional filters.
Current filter popout:
Filter popout with ability to add additional filters via an Add Filter button:
Competitor's GridView controls have this feature already and it would be very useful to have this feature on the RadGridView control.
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.