Hi,
I'am testing Telerik .NET MAUI controls for windows and android. FontFamily property of columns (both for xaml and app.xaml) not working. If an embedded font is choosen for whole application, DataGrids look different from other parts of the application
here is my xaml, "fnt_bold" is a MauiFont in resources. All other ui components are shown in my font
<telerik:RadDataGrid x:Name="dataGrid" AutoGenerateColumns="False" UserEditMode="None" UserGroupMode="Disabled" SelectionMode="Single" SelectionUnit="Row" >
<telerik:RadDataGrid.Columns>
<telerik:DataGridTextColumn PropertyName="ID" HeaderText="RefID" Width="60" SizeMode="Fixed">
<telerik:DataGridTextColumn.CellContentStyle>
<telerik:DataGridTextCellStyle FontFamily="fnt_bold" FontSize="12.25"/>
</telerik:DataGridTextColumn.CellContentStyle>
</telerik:DataGridTextColumn>
<telerik:DataGridTextColumn PropertyName="CODE" HeaderText="Code" Width="80" SizeMode="Fixed">
<telerik:DataGridTextColumn.CellContentStyle>
<telerik:DataGridTextCellStyle FontFamily="fnt_bold" FontSize="12.25"/>
</telerik:DataGridTextColumn.CellContentStyle>
</telerik:DataGridTextColumn>
<telerik:DataGridTextColumn PropertyName="NAME" HeaderText="Name" Width="250" SizeMode="Fixed">
<telerik:DataGridTextColumn.CellContentStyle>
<telerik:DataGridTextCellStyle FontFamily="fnt_regular" FontSize="12.25"/>
</telerik:DataGridTextColumn.CellContentStyle>
</telerik:DataGridTextColumn>
</telerik:RadDataGrid.Columns>
</telerik:RadDataGrid>
I have attached a screenshot from my test app.
I also checked the sample telerik android app (Telerik UI for .NET MAUI Controls). DataGrid components in Telerik Sample app also dont use the expected font unlike all other ui components.
Just one of the DataGrid samples of one column in the sample app has the correct fontfamily property. I have attached that screenshot also. I couldn't figure out how to implement it.
Am i missing something?
Thanks in advance.
Ender
When navigating to DataGrid examples, xaml binding errors occur for ActualWidth and Header Text.
Still, the app runs as expected.
.Net Maui Data Grid Property Aggregator Descriptor incorrect placement on Mac
We’ve encountered an issue related to the inner DataGrid within an outer DataGrid’s RowDetailsTemplate:
Steps to reproduce:
1. Create a DataGrid with editable cells and row details.
2. Inside the RowDetailsTemplate, place a layout (e.g., Grid).
3. Within this layout, embed another DataGrid with editable cells.
4. Start the application and expand row details on the Android platform.
5. Double-tap on any inner DataGrid's cell to open the cell editor.
At this moment the UI appears unresponsive.
Hi Team,
I have attached a reproducible. Open DashboardView.xaml, there you'll find the DataGrid.
Run the project on Windows and take the following steps:
The only way I could get it to render again was by resizing the app window, even calling InvalidateMeasure(SizeChanged) didn't work.
The logic is simple, the button click just clears MainPage.xaml's container children and adds a new instance of DashboardView:
private void OnButton1Clicked(object sender, EventArgs e)
{
currentContentViewHolder.Children.Clear();
currentContentViewHolder.Children.Add(new DashboardView());
}
DataGrid is added inside pages that can be accessed through shell flyout menu.
And the exact steps to reproduce the issue:
Go to page GridOne page in flyout menu.If I use the CellEditTemplate to show a custom view when editing - the view does not get auto focus when shown and the end user needs to tap inside so the view gets focus.
<telerik:DataGridTextColumn PropertyName="CountryName" HeaderText="Country">
<telerik:DataGridTextColumn.CellEditTemplate>
<DataTemplate>
<telerik:RadEntry Text="{Binding Item.CountryName}" />
</DataTemplate>
</telerik:DataGridTextColumn.CellEditTemplate>
</telerik:DataGridTextColumn>
Work-around:
Manually invoke the Focus() method and set the cursor position when the view gets loaded and when it changes its visibility:
<telerik:RadEntry Text="{Binding Item.CountryName}"
Loaded="RadEntry_Loaded"
PropertyChanged="RadEntry_PropertyChanged" />
private void RadEntry_PropertyChanged(object sender, System.ComponentModel.PropertyChangedEventArgs e)
{
if (e.PropertyName == nameof(View.IsVisible))
{
RadEntry entry = (RadEntry)sender;
if (entry.IsVisible)
{
FocusEntry(entry);
}
}
}
private void RadEntry_Loaded(object sender, EventArgs e)
{
FocusEntry((RadEntry)sender);
}
private static void FocusEntry(RadEntry entry)
{
entry.Dispatcher.DispatchDelayed(TimeSpan.FromMilliseconds(1), () =>
{
entry.Focus();
entry.CursorPosition = entry.Text?.Length ?? 0;
});
}
When we have ListenForNestedPropertyChange property set to true and at some point Clear of the ItemsSource is called the newly added items to the collection stop to listen for PropertyChanged.
In order to make ListenForNestedPropertyChange work again toggle the value of the property. First set it to false and after that back to true.
scrolling is not smooth (items jump up/down when scrolling)
Tested on Samsung S9+ and S10
I tested streaming data for nested property and the UI does not update. The data is updated in the collection bound to the DataGrid ItemsSource, still the UI doesn't.
When I enter editing the cell, the UI updates.
The issue happens in this case:
<telerik:DataGridNumericalColumn PropertyName="Address.Age"
HeaderText="Age" />
<telerik:DataGridTextColumn DataMemberBinding="{Binding Address.Age}"
HeaderText="Age DataMemberBinding"/>
When setting MinimunHeightRequest to the DataGrid control, the height is not respected.
If you have minimum and maximum height request set, maximum will be applied instead.
.Net Maui Data Grid Property Aggregator Descriptor disappears when displaying columns in the same data grid which doesn't have aggregate property set
Hi Team,
Please refer to the following screenshot from the ControlsSamples project on Windows:
Notice the descender on the y character is pushing up the Delivery column header's Label container, but the Price text is flush with the bottom? This is causing misalignment between text in other column headers that do not have descenders.
You might not immediately notice this, for example in the Aggregates demo, only the first column has no descenders but the next two do.
However, it's a more serious visual problem when every other column is vertically offset. Please consider adding a default Padding to account for descenders, or maybe change the VerticalOptions of the text container to be center aligned.
Thank you,
Matthew & Team
I have a DataGrid with ItemsSource bound to ObservableRangeCollection,
First I Clear() the existing items of the collection, then add new items, and raises a single CollectionChanged event with action = NotifyCollectionChangedAction.Reset.
the grid continues to show nothing.
This works with .NET MAUI CollectionView and ListView
Workaround: Add a delay after clearing the collection.