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.
Add a textbox which allow search and filter functionality for the distinct values in the FilteringControl of RadGridView.
In the meantime, you can check the attached project that shows one way to achieve this.
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.
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 });
}
Calling the BeginInsert() method of RadGridView, adds a new row at the bottom of the items and scrolls to the newly added row. However, if the vertical scrollbar is not visible and the newly added row makes the viewport so big that the scrollbar should display, the row gets clipped. Also, the vertical scrollbar that was just added is not scrolled to the bottom, which is actually why the row is clipped. Each next insert (after the scrollbar gets visible) will display the added row properly.
To work this around, you can scroll the vertical scrollbar manually to bottom.
private void BeginInsertRow()
{
var scrollViewer = this.gridView.FindChildByType<GridViewScrollViewer>();
bool requestScrollToBottom = false;
if (scrollViewer.ComputedVerticalScrollBarVisibility == Visibility.Collapsed)
{
var panel = this.gridView.FindChildByType<GridViewVirtualizingPanel>();
var sumHeight = (source.Count + 1) * this.gridView.RowHeight;
requestScrollToBottom = sumHeight > panel.ActualHeight;
}
this.gridView.BeginInsert();
if (requestScrollToBottom)
{
scrollViewer.ScrollToBottom();
}
}