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.
Hi
I have a grid where some rows contain child rows. In order to control which rows have the "+" expander icon I use the IsExpandableBinding property. I also have a toolbar which contains a convenience button to collapse all the expanded rows.
This button is bound to a handler which called RasGridView.CollapseAllHierarchyItems(), but this does not have any effect. I've tried removing the IsExpandableBinding property, and the collapse mechanism then works (but I get unwanted expanders on every row).
The designer crashes with this exception: InvalidOperationException: 'GridViewColumnGroupRow' TargetType does not match type of element 'GridViewColumnGroupRow'. See the attached screenshot. It's from a new project, after clean and rebuild. Visual studio: 2015 Telerik UI for wpf: 2015.2 Implicit styles, Windows8 theme. * The problem is not theme specific. As a workaround, use no xaml binaries instead of xaml files.
GridViewHeaderCell are not draggable when RadGridView is hosted in DropDownButton.DropDownContent. Trying to drag a cell does not trigger drag events. The problem should be resolved with lib version 2015.3.1012.
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
I would like to be bale to modify at once several cells of a GridViewComboBoxColumn, when using the common ItemsSourceBinding for all rows (in my GridView, the selection is: SelectionMode="Multiple" SelectionUnit="FullRow"). So I would like for the selected rows to apply the same value as the edited cell.
With R2 2016 GridViewComboBoxColumn will expose a property IsLightweightModeEnabled. Setting the property to True should resolve the problem.
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
The problem should be resolved with lib version 2015.3.1130.
GridViewDataColumn doesn't respect FallbackValue when the source property returns DependencyProperty.UnsetValue
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();
}
}
The issue is reproduced only with GroupRenderMode="Flat".