In the following scenario:
<telerik:RadGridView x:Name="clubsGrid" ItemsSource="{Binding Foos}" AutoGenerateColumns="False">
<telerik:RadGridView.Columns>
<telerik:GridViewDataColumn DataMemberBinding="{Binding Foo1}" MinWidth="100" />
<telerik:GridViewDataColumn DataMemberBinding="{Binding Foo2}" MinWidth="100" />
<telerik:GridViewDataColumn DataMemberBinding="{Binding Foo3}" Width="*" />
<telerik:GridViewDataColumn DataMemberBinding="{Binding Foo4}" MinWidth="100" />
<telerik:GridViewDataColumn DataMemberBinding="{Binding Foo5}" MinWidth="100" />
<telerik:GridViewDataColumn DataMemberBinding="{Binding Foo6}" MinWidth="100" />
</telerik:RadGridView.Columns>
</telerik:RadGridView>
<DataGrid ItemsSource="{Binding Foos}" AutoGenerateColumns="False" Grid.Row="1">
<DataGrid.Columns>
<DataGridTextColumn Binding="{Binding Foo1}" MinWidth="100" />
<DataGridTextColumn Binding="{Binding Foo2}" MinWidth="100" />
<DataGridTextColumn Binding="{Binding Foo3}" Width="*" />
<DataGridTextColumn Binding="{Binding Foo4}" MinWidth="100" />
<DataGridTextColumn Binding="{Binding Foo5}" MinWidth="100" />
<DataGridTextColumn Binding="{Binding Foo6}" MinWidth="100" />
</DataGrid.Columns>
</DataGrid>
in the native DataGrid after the Width of Foo4 column is increased towards Foo3, then the Width of Foo5/Foo6 columns can also be increased. We can implement similar behavior in the RadGridView as well.
Pixel bug in Lightweight Templates of RadGridView in VisualStudio2013 and Office2013 themes:
No horizontal grid lines when cell has background color:
Most likely bottom margin of PART_CellBorder not set in VisualStudio2013 Theme. In Office2016 PART_CellBorder.Margin="0 0 0 1"
Special chars '+', '-'. '"" modify the default search criteria in the search as you type feature.
Add option to disable this behavior. It would be useful in scenarios with strings starting with + or -.
Also option should be available for setting in MultiColumnComboBox.
The background of the GridView's group headers has a light background in the dark color variation of the Windows 11 theme.
This reproduces only the GroupRenderMode property of RadGridView is set to Nested (the default value).
To work this around set the GroupRenderMode property of RadGridView to Flat.
This issue manifests when RadGridView loaded some columns first (which are working) and then add more columns. The additional columns cannot paste values in their cells.
To work this around, mark the new columns as auto generated and call one of the internal methods.
newColumn.IsAutoGenerated = true;
this.gridView.Columns.Add(newColumn);
var collectionViewPropInfo = this.gridView.Items.GetType().GetProperty("CollectionView", System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.NonPublic);
var qcv = (QueryableCollectionView)collectionViewPropInfo.GetValue(this.gridView.Items);
var methodInfo = qcv.GetType().GetMethod("OnElementTypeChanged", System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.NonPublic);
methodInfo.Invoke(qcv, new object[0]);
Setting ShowDistinctFilters for a RadGridViewColumn hides the distinct values from the filter popup as expected.
But the grid still queries the ItemsSource for distinct values of said column when showing thje popup - it calls something like
MyQueryable.Select(item => item.SomeColumn).Distinct().OrderBy(item => item).Take(1000))
Filtering the data by distinct value using the filter query optimization doesn't work properly when adding more than 500 distinct values. To reproduce this, set the OptimizeDistinctFilterQuery property of the corresponding column to True. The distinct values should be filtered using the ColumnFilterDescriptor and the AddDistinctValue method of the DistinctFilter.
In that case, the filter can get reversed and remove the selected distinct values from the data view, instead of adding only them, as would be expected. Or the filter can stop working at all and display all values from the ItemsSource.
To work this around, instead of using the ColumnFilterDescriptor and the AddDistinctValue method, add a composite filter descriptor manually in the FilterDescriptors of RadGridView.
radGridView.FilterDescriptors.SuspendNotifications();
var distinctValuesFilter = new CompositeFilterDescriptor();
distinctValuesFilter.LogicalOperator = FilterCompositionLogicalOperator.Or;
for (int i = 0; i < 5000; i++)
{
object disctincValue = i;
var filter = new FilterDescriptor("Id", FilterOperator.IsEqualTo, disctincValue);
distinctValuesFilter.FilterDescriptors.Add(filter);
}
radGridView.FilterDescriptors.Add(distinctValuesFilter);
radGridView.FilterDescriptors.ResumeNotifications();
The current row indicator visual (the right pointing arrow) gets hidden if you enter edit mode of a cell (which shows the cell edit indicator) and then press Esc two times. The first time cancel the cell editing and the second time cancels the row editing.
This reproduces in the VisualStudio2013 theme.
To work this around, extract the ControlTemplate of GridViewRow for the VisualStudio2013 theme and add the following MultiTrigger at the bottom of the template (last in the ControlTemplate.Triggers collection).
<MultiTrigger>
<MultiTrigger.Conditions>
<Condition Property="IsValid" Value="True"/>
<Condition Property="IsCurrent" Value="True"/>
<Condition Property="IsInEditMode" Value="False"/>
</MultiTrigger.Conditions>
<Setter TargetName="NavigatorIndicator" Property="Visibility" Value="Visible"/>
</MultiTrigger>
The aggregate values shown in the group headers are wrong when scrolling. This happens when the EnableColumnVirtualization property is set to False and ColumnAggregatesAlignment is NextToGroupKey or BelowGroupKey.
To work this around, set the EnableColumnVirtualization property to True or ColumnAggregatesAlignment to NoAlignment.