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();
}
}
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.
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);
}
}
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.
If you reference both Telerik.Windows.Controls.GridView and Telerik.Windows.Controls.Data assemblies and you try to access the ControlPanelItemCollection class in XAML using the "telerik" schema, an error appears. This happens because classes with this name are available in both assembly and both classes are mapped to the "telerik" schema.
To work this around, use a concrete namespace instead of the "telerik" schema. For example:
xmlns:gridView="clr-namespace:Telerik.Windows.Controls.GridView;assembly=Telerik.Windows.Controls.GridView"
Hi,
as you can see in the screenshot below the new dark Material Theme has the bug, that the selected row is white if it's not focused.
I can not find in the code where this white color comes from.
I encountered it only in the GridView and TreeListView yet.
Also I can say, that it wasn't like that before the new update. I made my own dark material theme and it didn't appear like this before.
Greetings Benedikt