When you have rows grouped by null value and you try to move one of the rows to another group, a NullReferenceException is thrown.
This is reproducible only when DataView is used as ItemsSource of RadGridView.
To work this around, avoid using null values. Or avoid using DataView.
The GroupRenderMode of the RadGridVIew is set to Flat. The control is populated with items that implement the IList interface. The Count property of the custom objects needs to return value bigger than 1. So when the Delete button is pressed, the rows beneath the deleted one will also be deleted. Their number depends on the Count property of the custom object.
To reproduce this:
To work this around call the Rebind() method of RadGridView on RowDetailsVisibilityChanged event.
private void RadGridView_RowDetailsVisibilityChanged(object sender, Telerik.Windows.Controls.GridView.GridViewRowDetailsEventArgs e)
{
if (e.Visibility == Visibility.Collapsed)
{
this.gridView.Rebind();
}
}
Blank spaces where rows should appear are observed in the following situation. You start editing a row or a column, then scroll the row outside of the viewport before the edit was committed. Then sort a column.
This is reproducible only if the GroupRenderMode property of RadGridView is set to Flat. Also, the AutoGenerateColumns property should be set to False and the Columns should be added manually.
Note that the issue is reproducible also in RadTreeListView, which has the GroupRenderMode set to Flat by default.
To work this around, set the GroupRenderMode property of RadGridView to Nested.
SearchStateManager property is null when trying to change any of the properties of the SearchStateManager object in the Loaded event. This behavior is observed when the ShowSearchPanel property is not set to true initially.
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 -
The search box TextBox element used with the search-as-you-type feature is not focused when you press the Tab key. This happens because the search box is excluded from the tab order (IsTabStop=False).
Use the ChildrenOfType extension method to get the TextBox element and set its IsTabStop to True.
private void gridView_Loaded(object sender, RoutedEventArgs e)
{
var searchBox = this.gridView.ChildrenOfType<TextBox>().FirstOrDefault(x => x.Name == "PART_SearchAsYouTypeTextBox");
searchBox.IsTabStop = true;
}
The ItemsControl that holds the control panel of RadGridView should not be included in the tab order. Its IsTabStop property should be False. Only the items inside of it should be included in the tab order.
To work this around, use the ChildrenOfType extension method to get the ItemsControl and set its IsTabStop property. Optionally, you can exclude also the ControlPanelItemControl elements from the tab order.
private void gridView_Loaded(object sender, RoutedEventArgs e)
{
var controlPanel = this.gridView.ChildrenOfType<ItemsControl>().FirstOrDefault(x => x.Name == "PART_ControlPanelItemsControl");
controlPanel.IsTabStop = false;
}