The DataGrid Search As You Type feature provides search text highlighting through the CellContentStyle property of the columns.
CellContentStyle is taken into account only for the default columns, so when you specify a custom CellContentTemplate or use a TemplateColumn currently the search text highlighting is not applied.
The DataGrid will crash when there is a bunch of CollectionChanged events with Grouping enabled. This happens in 6.6.0, 6.7.x and 6.8.x versions of the Telerik DataGrid.
As of Telerik v7.0.0 this started to happen. In v6.8.0 the issue doesn't occur. The customer uploaded a sample project in the support ticket.
Issue description:
When the grid contains, after filtering out ,no rows the "Empty template" is not used/displayed.
Tested on Windows, with "Telerik_UI_for_dot_NET_Maui_7_1_0_Dev\Examples\ControlsSamples", Example "Empty Template".
Steps to reproduce:
Expected behavior:
Display/Use "Empty template" when there are no visible records.
...or to make it more consistent with the current implementation - add new option "ItemsSourceNullOrEmptyOrFilteredOut" to the enum "EmptyContentDisplayMode":
namespace Telerik.Maui.Controls;
//
// Summary:
// Defines the modes for displaying empty content.
public enum EmptyContentDisplayMode
{
//
// Summary:
// Displays the empty content view only when the ItemsSource is null.
ItemsSourceNull,
//
// Summary:
// Displays the empty content view when ItemsSource is null or when the source is
// empty (has zero items).
ItemsSourceNullOrEmpty,
+ //
+ // Summary:
+ // Displays the empty content view when ItemsSource is null or when the source is
+ // empty (has zero items) or when all items are filtered out. (either by filter or by search)
+ ItemsSourceNullOrEmptyOrFilteredOut
}
Best regards,
Peter
Having this setup:
<telerikDataGrid:DataGridTemplateColumn HeaderText="Age"
CanUserSort="True">
<telerikDataGrid:DataGridTemplateColumn.CellContentTemplate>
<DataTemplate>
<Label Text="{Binding Age}" />
</DataTemplate>
</telerikDataGrid:DataGridTemplateColumn.CellContentTemplate>
<telerikDataGrid:DataGridTemplateColumn.SortDescriptor>
<telerikCommon:PropertySortDescriptor PropertyName="Age" SortOrder="Descending" />
</telerikDataGrid:DataGridTemplateColumn.SortDescriptor>
</telerikDataGrid:DataGridTemplateColumn>
When applying SortDescriptor to the Template column, the column is not initially sorted.
I have been trying to get the DataGrid to work with Maui.Markup and I'm not finding a way to add a DataGrid to my View.
I would have expected I could add a DataGrid to the Children of Grid...but I'm not finding the right cast to allow that to happen, Grid.Children is expecting an IView.
Is this possible and I'm just missing something simple? Thanks!
I am using NavigationPages and Dependency Injection (for the Pages and ViewModels) to navigate (not AppShell).
<Grid RowDefinitions="*,100">
<telerik:RadDataGrid x:Name="grdRegisters"
RowHeight="50"
Style="{StaticResource ReadOnlyGridStyle}"
ItemsSource="{Binding Registers}"
SelectionStyle="{StaticResource SelectedRowBackgroundStyle}"
RowBackgroundStyle="{StaticResource RowBackgroundStyle}"
AlternateRowBackgroundStyle="{StaticResource AltRowBackgroundStyle}"
SelectedItem="{Binding SelectedRegister, Mode=TwoWay}">
<telerik:RadDataGrid.Columns>
<telerik:DataGridTemplateColumn HeaderText=""
SizeMode="Fixed"
Width="50">
<telerik:DataGridTemplateColumn.CellContentTemplate>
<DataTemplate x:DataType="RegisterModel">
<Label FontFamily="FASolid"
HorizontalOptions="Center"
VerticalOptions="Center"
Text=""
IsVisible="{Binding IsCurrentRegister, Mode=OneTime}"/>
</DataTemplate>
</telerik:DataGridTemplateColumn.CellContentTemplate>
</telerik:DataGridTemplateColumn>
<telerik:DataGridTemplateColumn HeaderText="Shift Date">
<telerik:DataGridTemplateColumn.CellContentTemplate>
<DataTemplate x:DataType="RegisterModel">
<Label Style="{StaticResource GridCellLabelStyle}"
Text="{Binding Date, Converter={StaticResource ToLocalTimeConverter}, StringFormat='{}{0:d}'}"/>
</DataTemplate>
</telerik:DataGridTemplateColumn.CellContentTemplate>
</telerik:DataGridTemplateColumn>
<telerik:DataGridTemplateColumn HeaderText="Shift Name">
<telerik:DataGridTemplateColumn.CellContentTemplate>
<DataTemplate x:DataType="RegisterModel">
<Label Style="{StaticResource GridCellLabelStyle}"
Text="{Binding Shift.Name}"/>
</DataTemplate>
</telerik:DataGridTemplateColumn.CellContentTemplate>
</telerik:DataGridTemplateColumn>
<telerik:DataGridTemplateColumn HeaderText="Start Time">
<telerik:DataGridTemplateColumn.CellContentTemplate>
<DataTemplate x:DataType="RegisterModel">
<Label Style="{StaticResource GridCellLabelStyle}"
Text="{Binding StartTime, Converter={StaticResource ToLocalTimeConverter}, StringFormat='{}{0:t}'}"/>
</DataTemplate>
</telerik:DataGridTemplateColumn.CellContentTemplate>
</telerik:DataGridTemplateColumn>
<telerik:DataGridTemplateColumn HeaderText="End Time">
<telerik:DataGridTemplateColumn.CellContentTemplate>
<DataTemplate x:DataType="RegisterModel">
<Label Style="{StaticResource GridCellLabelStyle}"
Text="{Binding EndTime, Converter={StaticResource ToLocalTimeConverter}, StringFormat='{}{0:t}'}"/>
</DataTemplate>
</telerik:DataGridTemplateColumn.CellContentTemplate>
</telerik:DataGridTemplateColumn>
</telerik:RadDataGrid.Columns>
</telerik:RadDataGrid>
<HorizontalStackLayout Grid.Row="1">
<Button Text="Resume"
IsEnabled="{Binding SelectedRegister, Converter={StaticResource IsNotNullConverter}}"
Command="{Binding ResumeShiftCommand}"/>
<Button Text="Refresh"
Command="{Binding RefreshCommand}"/>
</HorizontalStackLayout>
</Grid>
On initial Refresh, all items are visible in the DataGrid
I navigate forward and then back (PopToRoot), the DataGrid appears empty, although the vertical scroll appears like there are items.
If I tap Refresh, items become visible, but only above the first fold.
If i resize the window vertically, items will appear and disappear depending on the height of the window. (see attached video)