The column group headers are not displayed when the DisplayIndex property of the GridViewColumn objects is set before the control is loaded.
To work this around, you can set the DisplayIndex of the columns after the RadGridView is loaded.
Empty cells appear when the RadGridView contains many cells in the viewport and the view gets resized.
To work this around you can extract and modify the ControlTemplate of GridViewCell, in order to set the MinHeight property of the "PART_ContentPresenter" element to a number close to the RowHeight of 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.
The vertical scrolling seems to become very slow and even unresponsive, when the following conditions are met:
To minimize the issue, you can set the GroupRenderMode property of RadGridView to Nested.
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))
If in the content of RadGridView.ControlPanelItem has a binding with a RelativeSource or ElementName and the grid is placed in the collapsed UserControl, a binding error is thrown in the output window.
We noticed that RadGridView does not get garbagecollected sometimes.
So i fired up a memory analyzer to see what is going on.
This is the graph that shows that the RadGridView is causing a leak. The only references that keep the GridView from getting collected are those two WeakEventListeners
To further investigate i decompiled GridViewDataControl and could identify the culprit.
private void SubscribeToDispatcherShutdown()
{
if (this.dispatcherShutdownListener != null)
this.dispatcherShutdownListener.Detach();
this.dispatcherShutdownListener = new WeakEventListener<GridViewDataControl, object, EventArgs>(this);
this.dispatcherShutdownListener.OnEventAction = (Action<GridViewDataControl, object, EventArgs>) ((grid, source, eventArgs) => grid.OnDispatcherShutdownFinished(source, eventArgs));
this.dispatcherShutdownListener.OnDetachAction = (Action<WeakEventListener<GridViewDataControl, object, EventArgs>>) (weakEventListener => this.Dispatcher.ShutdownFinished -= new EventHandler(this.dispatcherShutdownListener.OnEvent));
this.Dispatcher.ShutdownFinished += new EventHandler(this.dispatcherShutdownListener.OnEvent);
}
In the second line from the botton
... weakEventListener => this.Dispatcher.ShutdownFinished -
If you have the following model, the columns that show the Test and Date properties (in the derived class) cannot be sorted or filtered.
public
class
RowModel
{
public
int
Id {
get
;
set
; }
public
Bar FredBar {
get
;
set
; }
}
public
class
Fred : Bar
{
public
DateTime Date {
get
;
set
; }
public
string
Test {
get
;
set
; }
}
public
abstract
class
Bar
{
public
string
Title {
get
;
set
; }
public
double
Value {
get
;
set
; }
}
<
telerik:RadGridView.Columns
>
<
telerik:GridViewDataColumn
DataMemberBinding
=
"{Binding Id}"
/>
<
telerik:GridViewDataColumn
DataMemberBinding
=
"{Binding FredBar.Title}"
/>
<
telerik:GridViewDataColumn
DataMemberBinding
=
"{Binding FredBar.Value}"
/>
<
telerik:GridViewDataColumn
DataMemberBinding
=
"{Binding FredBar.Date}"
/>
<
telerik:GridViewDataColumn
DataMemberBinding
=
"{Binding FredBar.Test}"
/>
</
telerik:RadGridView.Columns
>
Bind a grid to a DataView
Start editing and change the values of a few cells.
Press Escape twice to cancel the edit of the entire row.
Expected: the values return to the old values
Actual: the values remain the last entered ones
Unhandled exception System.InvalidOperationException: The calling thread cannot access this object because a different thread owns it. at System.Windows.Threading.Dispatcher.VerifyAccess() at System.Windows.DependencyObject.GetValue(DependencyProperty dp) at Telerik.Windows.Data.SortDescriptorBase.get_SortDirection() at Telerik.Windows.Data.Expressions.SortDescriptorCollectionExpressionBuilder.Sort() at Telerik.Windows.Data.QueryableExtensions.Sort(IQueryable source, IEnumerable`1 sortDescriptors) at Telerik.Windows.Data.QueryableExtensions.Sort(IQueryable source, SortDescriptorCollection sortDescriptors) . . .