I have a RadGridView and bind its ItemsSource and its SelectedItem to properties of the ViewModel (DataContext). When the ViewModel is created, the property bound to ItemsSource is filled and the property bound to SelectedItem is set to one of the items in the collection. However, when the GridView is displayed, the property is first set to null and then set to the first item in the collection. I assume that the binding of the SelectedItem is evaluated before the binding of the ItemsSource, so the grid is empty and the desired item can't be selected. Is there any way to influence the order, in which the binding are evaluated? Or is there any other way to avoid that the SelectedItem is changed? A similar issue is described here: http://www.telerik.com/forums/selecteditem-binding-issue Unfortunately, I couldn't to find the support ticket mentioned in this thread.
Add option in GridViewDocumentExportOptions to include / exclude GroupHeaderRowAggregates. This will allow users to hide/show group header row aggregates in the exported documents. Option will be globbally applied - to all group header rows in the RadGridView. === From 2017 R3 SP GridViewDocumentExportOptions adds ShowGroupHeaderRowAggregates bool property. It can be used like so: GridViewDocumentExportOptions options = new GridViewDocumentExportOptions() { ShowGroupHeaderRowAggregates = true }; this.gridView.ExportToWorkbook(options);
Currently, the aggregate results in the GroupHeaderRow are not aligned according to the columns whose value they summarize. We can introduce such functionality which will require modifying the control template of the GroupHeaderRow. Completed in R3 2017.
Edit: We are declining this bug as originally the export options were not meant to respect group properties but only some global GridView properties. However we will add such option in GridViewDocumentExportOptions class. You can follow this feature request => https://feedback.telerik.com/Project/143/Feedback/Details/229211-gridview-add-option-in-gridviewdocumentexportoptions-to-include-exclude-grouph
Same as the one available in Excel. Please check the attached screenshot.
Currently, the following workaround can be applied: private void RadGridView_Loaded(object sender, RoutedEventArgs e) { var gridView = sender as RadGridView; foreach (var column in gridView.Columns) { if (!column.IsResizable) { Dispatcher.BeginInvoke((Action) (() => { var radGridView = column.Parent; foreach (var header in radGridView.ChildrenOfType<GridViewHeaderCell>()) { if (header.Column.DisplayIndex == column.DisplayIndex) { var leftGripper = header.ChildrenOfType<Thumb>().Where(x => x.Name == "PART_LeftHeaderGripper").First(); { leftGripper.Visibility = Visibility.Collapsed; } } else if (header.Column.DisplayIndex == (column.DisplayIndex - 1)) { var rightGripper = header.ChildrenOfType<Thumb>().Where(x => x.Name == "PART_RightHeaderGripper").First(); { rightGripper.Visibility = Visibility.Collapsed; } } } }), DispatcherPriority.Render); } } }
Add a TextAlignment property to the GridView's AggregateFunctions to set the alignment of the resulting text. Apply to both Caption and FormattedValue simultaneously. This way we won't have to make custom ItemTemplates for the AggregateResultsList in each footer, when using AggregateFunctions out-of-the-box.
This is reproducible in a hierarchical scenario. The nested gridview loses its selection when its parent row is scrolled out of the viewport.
Update: Before our change the GridViewGroupFooterCell content was right aligned and the GridViewFooterCell content was left aligned. We decided to unify them by setting default left alignment to both. This can be easily modified by changing the Column FooterTextAlignment property to Right or by using the following implicit styles: <Style TargetType="telerik:GridViewGroupFooterCell" BasedOn="{StaticResource GridViewGroupFooterCellStyle}"> <Setter Property="HorizontalContentAlignment" Value="Right"/> </Style> <Style TargetType="telerik:GridViewFooterCell" BasedOn="{StaticResource GridViewFooterCellStyle}"> <Setter Property="TextAlignment" Value="Right"/> </Style> The fix is available in R3 2017 of UI for WPF.
The header row (the group headers in a GridView, or a parent row in a TreeListView) stays in the screen while scrolling until all the children rows have been scrolled. The feature is available in R3 2017 Release of UI for WPF. Check what's new in R3 2017 here: http://www.telerik.com/support/whats-new/wpf/release-history/ui-for-wpf-r3-2017
Currently VQCV caches all the items once they are loaded. In this way the data virtaulization functions only through the first bottom-most item scrolling. The idea behind this item is to make this behavior optional by introducing an alternative mode.
workaround: public MainWindow() { InitializeComponent(); this.grid.Loaded += grid_Loaded; } void grid_Loaded(object sender, RoutedEventArgs e) { this.grid.ChildrenOfType<Grid>().FirstOrDefault(x => x.Name == "PART_OuterGrid").RowDefinitions[1].Height = GridLength.Auto; var cells = this.grid.ChildrenOfType<GridViewHeaderCell>(); foreach (GridViewHeaderCell cell in cells) { cell.ChildrenOfType<Grid>().FirstOrDefault(x => x.Name == "PART_OuterGrid").RowDefinitions[1].Height = GridLength.Auto; } }
By default, the RadGridView will expand its rows to fit whatever the size of the text content. If you have a large amount of text with newlines, it essentially renders the grid unusable in this state. The thread http://www.telerik.com/forums/limit-row-height suggests two workaround: 1) using a converter to remove newlines- this is a bad solution because it means the binding on the column must be one-way. 2) Applying styling to the grid's textblock- also not great because its non-obvious and requires a lot of boilerplate. My suggestion is two properties on the RadGridView: MaxRowHeight and MultilineRowContentBehavior. This second property would determine what happens when a row has multiline content and would take an enumeration: SizeHeightToContent- the current behavior. SingleLineExpandOnEdit- when displaying, shows only a single line of the multiline content. When editing, expands the TextBox to fit the content. SingleLine- displays and edits the content in a single line.
Current workaround for the affected themes - Define the following control template for the GridViewCheckBox: <ControlTemplate x:Key="GridViewCheckBoxTemplate" TargetType="telerik:GridViewCheckBox"> <Grid HorizontalAlignment="Left" VerticalAlignment="Center" Width="13" Height="13"> <VisualStateManager.VisualStateGroups> <VisualStateGroup x:Name="CheckStates"> <VisualState x:Name="Checked"> <Storyboard> <ObjectAnimationUsingKeyFrames BeginTime="0" Duration="0" Storyboard.TargetName="CheckedPath" Storyboard.TargetProperty="(UIElement.Visibility)"> <DiscreteObjectKeyFrame KeyTime="0"> <DiscreteObjectKeyFrame.Value> <Visibility>Visible</Visibility> </DiscreteObjectKeyFrame.Value> </DiscreteObjectKeyFrame> </ObjectAnimationUsingKeyFrames> </Storyboard> </VisualState> <VisualState x:Name="Unchecked"/> <VisualState x:Name="Indeterminate"> <Storyboard> <ObjectAnimationUsingKeyFrames BeginTime="0" Duration="0" Storyboard.TargetName="IndeterminatePath" Storyboard.TargetProperty="(UIElement.Visibility)"> <DiscreteObjectKeyFrame KeyTime="0"> <DiscreteObjectKeyFrame.Value> <Visibility>Visible</Visibility> </DiscreteObjectKeyFrame.Value> </DiscreteObjectKeyFrame> </ObjectAnimationUsingKeyFrames> </Storyboard> </VisualState> </VisualStateGroup> </VisualStateManager.VisualStateGroups> <Grid Background="Transparent"> <Border BorderBrush="{TemplateBinding BorderBrush}" Background="{TemplateBinding Background}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="{telerik:Office2016Resource ResourceKey=CornerRadius}"/> <Border x:Name="IndeterminatePath" Width="9" Height="9" VerticalAlignment="Center" HorizontalAlignment="Center" Background="{telerik:Office2016Resource ResourceKey=IconBrush}" Visibility="Collapsed"/> <TextBlock x:Name="CheckedPath" HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="13" FontWeight="Normal" FontStyle="Normal" Foreground="{TemplateBinding Foreground}" FontFamily="{StaticResource TelerikWebUI}" telerik:GlyphAdorner.ShowGlyphInDesignTime="True" Opacity="1" Margin="-1 0 0 0" Visibility="Collapsed"> <Run Text="{StaticResource GlyphCheck}"/> </TextBlock> </Grid> </Grid> </ControlTemplate> <Style TargetType="telerik:GridViewCheckBox" BasedOn="{StaticResource GridViewCheckBoxStyle}"> <Setter Property="Template" Value="{StaticResource GridViewCheckBoxTemplate}"/> </Style> Fix available in LIB version 2017.2.814.
A workaround it so use a GridViewDataColumn and define a CheckBox within its CellTemplate. Fix available in LIB version 2017.2.814.