The DataGrid ScrollBar is covered by the group header when grouping.
looking the attachment.
Currently, the Save and Cancel words in the inline editor buttons are using hardcoded strings. Add LocalizationManager support in order to allow easier customization when translating the application.
In the meantime, you can achieve this effect by extracting the templates of the buttons and replace the hardoced text with LocalizationManager.
<Application
x:Class="TelerikWinUIApp7.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:localPrimitives="using:Telerik.UI.Xaml.Controls.Grid.Primitives"
xmlns:primitivesCommon="using:Telerik.UI.Xaml.Controls.Primitives.Common"
xmlns:core="using:Telerik.Core"
xmlns:local="using:TelerikWinUIApp7">
<Application.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<XamlControlsResources xmlns="using:Microsoft.UI.Xaml.Controls" />
<!-- Other merged dictionaries here -->
<ResourceDictionary Source="ms-appx:///Telerik.WinUI.Controls/Themes/Generic.xaml"/>
</ResourceDictionary.MergedDictionaries>
<!-- Other app resources here -->
<Style TargetType="localPrimitives:DataGridEditRow">
<Setter Property="CommitButtonStyle">
<Setter.Value>
<Style TargetType="primitivesCommon:InlineButton" BasedOn="{StaticResource EditRowButtonBaseStyle}">
<Setter Property="BorderThickness" Value="1 1 0 1" />
<Setter Property="ContentTemplate">
<Setter.Value>
<DataTemplate>
<StackPanel Orientation="Horizontal">
<TextBlock Text=""
FontFamily="{ThemeResource SymbolThemeFontFamily}"
VerticalAlignment="Center"
Margin="15 0 0 0"/>
<TextBlock core:LocalizationManager.Key="Save"
core:LocalizationManager.PropertyName="Text" Margin="8 0 15 0"/>
</StackPanel>
</DataTemplate>
</Setter.Value>
</Setter>
</Style>
</Setter.Value>
</Setter>
<Setter Property="CancelButtonStyle">
<Setter.Value>
<Style TargetType="primitivesCommon:InlineButton" BasedOn="{StaticResource EditRowButtonBaseStyle}">
<Setter Property="BorderThickness" Value="0 1 1 1" />
<Setter Property="ContentTemplate">
<Setter.Value>
<DataTemplate>
<StackPanel Orientation="Horizontal">
<TextBlock Text=""
FontFamily="{ThemeResource SymbolThemeFontFamily}"
VerticalAlignment="Center"
Margin="15 0 8 0"/>
<TextBlock core:LocalizationManager.Key="Cancel"
core:LocalizationManager.PropertyName="Text" Margin="0 0 15 0" VerticalAlignment="Center"/>
</StackPanel>
</DataTemplate>
</Setter.Value>
</Setter>
</Style>
</Setter.Value>
</Setter>
</Style>
</ResourceDictionary>
</Application.Resources>
</Application>
If you have already selected item(s) and then click on a new one to select it without holding Shift or Ctrl, the previous selection is cleared. This action should raise SelectionChanged with items in the RemovedItems collection of the event arguments. You can see this behavior in the native ListBox control. Also, this is how the RadDataGrid control is behaving in Single SelectionMode.
However, currently, if the SelectionMode is set to Extended, the RemovedItems collection doesn't contain any items.
The following exception is thrown when expanding row details with a height larger than the row height:
ArgumentOutOfRangeException: "Non-negative number required."
Hi Support
I'm using RadDataGrid on several pages in my application. There a pages where the scrollbar does not appear. On some pages it works.
The structure of the pages is similar. What are your suggestions to look for.
Regards,
Hans
Dynamically changing the Header of a RadDataGrid column is clearing the header visual's content. This means that you no longer see the header. To reproduce this the SizeMode of the column should be set to Fixed.
To work this around, instead of changing the Header of the column, you can assign the Header initially to a visual element - like TextBox - and change its content (like the Text property). Or alternatively, avoid the Fixed SizeMode.
The field filters in the DataGridNumericalFilterControl of DataGridNumericalColumn are using RadNumericBox controls for the input visuals. By default RadNumericBox is limited to values between 0 and 100, which means you cannot enter values outside of this range.
To work this around, you can re-template the DataGridNumericalFilterControl in order to set the Minimum and Maximum properties of the RadNumericBox element to NaN.
<Application
x:Class="App3.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:App3" xmlns:telerikDataGrid="using:Telerik.UI.Xaml.Controls.Grid.Primitives" xmlns:telerikInput="using:Telerik.UI.Xaml.Controls.Input">
<Application.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<XamlControlsResources xmlns="using:Microsoft.UI.Xaml.Controls" />
<ResourceDictionary Source="ms-appx:///Telerik.WinUI.Controls/Themes/Generic.xaml"/>
</ResourceDictionary.MergedDictionaries>
<Style TargetType="telerikDataGrid:DataGridNumericalFilterControl">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="telerikDataGrid:DataGridNumericalFilterControl">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<ComboBox x:Name="PART_OperatorCombo"
HorizontalAlignment="Stretch"
ItemsSource="{Binding OperatorsList}"
SelectedItem="{Binding FilterDescriptor.Operator, Mode=TwoWay, Converter={StaticResource FilterOperatorConverter}}"
DisplayMemberPath="DisplayText">
</ComboBox>
<telerikInput:RadNumericBox x:Name="PART_ValueBox"
Minimum="NaN"
Maximum="NaN"
HorizontalAlignment="Stretch"
Value="{Binding FilterDescriptor.Value, Mode=TwoWay}"
Grid.Row="1" Margin="0 10 0 0"/>
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</ResourceDictionary>
</Application.Resources>
</Application>
This is the same feature as the "FilterRow" FilteringMode setting of RadGridView for WPF.
The click actions (like cell selection and sorting) stop working when RadDataGrid is hosted in a RadTabControl or TabView. To reproduce this, you should select the tab item with the data grid, then select another tab, and select back the tab with the data grid. This prevents the hit testing in the RadDataGrid element.
The issue occurs because the hit test service used in the RadDataGrid implementation. The hit test service relies on the IsLoaded property of RadDataGrid (inherited from RadControl). The property is set in the Loaded and Unloaded events. However, when switching tabs, the Unloaded event is invoked on deselection, but on second selection of the same tab, the Loaded event is never called again, thus IsLoaded is false.
To work this around, you can subscribe to the PreviewSelectionChanged event of RadTabControl and manually update the internal isLoaded field of the data grid.
private void RadTabControl_PreviewSelectionChanged(object sender, Telerik.UI.Xaml.Controls.RadSelectionChangedEventArgs e)
{
if (e.AddedItems.Count > 0)
{
var gridView = ((RadTabItem)e.AddedItems[0]).Content as RadDataGrid;
var isLoadedField = typeof(RadControl).GetField("isLoaded", System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.NonPublic);
isLoadedField.SetValue(gridView, true);
}
}