The issue appears when you have two adjacent columns - one resizable on the left and one not-resizable (IsResizing=False) on the right. If you hide the left column (IsVisible=False), the resize handle of the right column is still there and it can be used to resize it.
To work this around, you can remove the next column and add it again in the Columns collection, after you hide the previous column.
this.gridView.Columns[1].IsVisible ^= true;
var nextColumn = this.gridView.Columns[2];
this.gridView.Columns.Remove(nextColumn);
this.gridView.Columns.Add(nextColumn);
The SelectedCells collection of RadGridView contains wrong cells in a scenario where the previous selection is cleared and then its items are filtered out of the view. This reproduces with SelectionMode set to Extended and SelectionUnit set to Mixed.
This happens if you call gridView.SelectedItems.Clear() or gridView.UnselectAll(). You can work around the issue if you clear the SelectedCells. To do so, call also gridView.SelectedCells.Clear().gridView.SelectedCells.Clear();
The vertical scrollbar of RadGridView disappears in some cases when the last parent item is expanded and then collapsed. The issue reproduces only with the Flat GroupRenderMode and when UseLayoutRounding property is set to True.
The workaround is to avoid setting the UseLayoutRounding property to True.
Hi,
I am currently having issues with RadGridView's group footer: I am trying to add a button to the footer template which is supposed to trigger a command which in turn needs some info on the group it was triggered from*.
Since (unlike the header) there does not seem to be any info on the group available directly within the GroupFooterTemplate, I am pulling the group info from the parent GridViewGroupFooterRow:
<telerik:GridViewDataColumn [...]>
<telerik:GridViewColumn.GroupFooterTemplate>
<DataTemplate>
<Button Command="{Binding DataContext.ShowFooterGroupCommand, RelativeSource={RelativeSource AncestorType=telerik:RadGridView}}"
CommandParameter="{Binding Group.Key, RelativeSource={RelativeSource AncestorType=telerik:GridViewGroupFooterRow}}" />
</DataTemplate>
</telerik:GridViewColumn.GroupFooterTemplate>
</telerik:GridViewDataColumn>
This is working great as long as the RadGridView does not use Row virtualization. However, when I turn on Row virtualization and scroll around for a bit, the value I get passed as the CommandParameter is more or less random and has nothing to do with the group my button is actually located in.
I attached a small example project (.Net 6 but our app uses 4.8 so I set that as the Framework below) for you to try it yourself. Just scroll around and click the buttons while watching the debug output window. You will see that the groups in the output window will not match the group where you actually clicked the button after some scrolling.
Even when virtualizing, the Group key returned when binding to GridViewGroupFooterRow.Group(.Key) should reliably return the key of the actual group my button is placed in. It would be even better if it was somehow possible to get the group directly, without having to resort to FindAncestor.
Regards
Simon Müller
Hofmann Fördertechnik GmbH
* Basically I am trying to give the user a possibility to add new items to the individual groups and I don't want to add the button to the group header since that makes it too easy to accidentally hit the header's RadToggleButton, collapsing the group.
When selecting a Cell using the Mouse, the BorderColor is different to when navigating via ArrowKeys.
Also it seems that the Property IsSynchronizedWithCurrentItem does not work correctly when using ArrowKeys.
The issue with the Color can be observed in the Demo
When using a QueryableCollectionView with a FilterDescriptor and a GroupDescriptor, items which are filtered won't be added to the (new) group after being edited programmatically.
For the time being, the Refresh method of the view can be called to reevaluate this or the filter descriptor can be removed and re-added.
QueryableEntityCoreCollectionView internal collections not in sync.
Currently, there is no workaround to this behavior.
GridView allows you to define an AggregateFunction for each column and display the summary information for all cells in the column when there is grouping enabled. This will produce a group header with an aggregate result for each column that has aggreagate functions defined.
Adding and removing columns from the RadGridView's Columns collection doesn't update the aggregate results displayed in the group header.
To work this around, you can remove the GroupDescriptor from the GridView control and add a new instance of the descriptor, when you add/remove an item.
private void RadButton_Click_1(object sender, RoutedEventArgs e)
{
var column = new GridViewDataColumn() { DataMemberBinding = new System.Windows.Data.Binding("Number1") };
column.AggregateFunctions.Add(new SumFunction());
this.gridView.Columns.Add(column);
var descriptor = (GroupDescriptor)this.gridView.GroupDescriptors[0];
this.gridView.GroupDescriptors.Remove(descriptor);
this.gridView.GroupDescriptors.Add(new GroupDescriptor() { Member = descriptor.Member });
}
When a RadGridView cell has a validation error, a red border will appear around the cell. In this case, the top validation border is missing on the first row cells. As a workaround, you can move the ContentPresenters of the cells a little bit in the loaded event of the control.
private void RadGridViewView_Loaded(object sender, System.Windows.RoutedEventArgs e)
{
var treeListView = sender as RadTreeListView;
var editorPresenters = treeListView.ChildrenOfType<ContentControl>().Where(x => x.Name == "PART_ContentPresenter" && x.ParentOfType<GridViewCell>() != null);
foreach (var item in editorPresenters)
{
item.Margin = new System.Windows.Thickness(1);
}
}