Add the ability to specify a template when the ItemsSource is null or collection is empty.
As a solution until this feature is implemented:
Hide the DataGrid and show any content over it in the case its ItemsSource is empty.
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.
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.<ContentPage.Resources>
<ResourceDictionary>
<Style TargetType="telerik:RadBusyIndicator" x:Name="busy">
<Setter Property="BackgroundColor" Value="Red"/>
</Style>
</ResourceDictionary>
</ContentPage.Resources>
<telerik:RadDataGrid IsBusy="True"/>
Header Text, group header text, do not display some languages characters like Chinese, Thai, etc.
The root reason for this is the fact that the Skia APIs used to draw the text does not support automatic character fallback.
Workaround:
for header text:
<telerik:DataGridTextColumn.HeaderContentTemplate>
<DataTemplate>
<Label Text="your text"></Label>
</DataTemplate>
</telerik:DataGridTextColumn.HeaderContentTemplate>
group header text
<telerik:RadDataGrid.GroupHeaderTemplate>
<DataTemplate>
<Label Text="{Binding Group.Key}"/>
</DataTemplate>
</telerik:RadDataGrid.GroupHeaderTemplate>
column:
<telerik:DataGridTextColumn HeaderText="Name" >
<telerik:DataGridTextColumn.CellContentTemplate>
<DataTemplate>
<Label Text="{Binding Name}"/>
</DataTemplate>
</telerik:DataGridTextColumn.CellContentTemplate>
</telerik:DataGridTextColumn>
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
Provide a user commands as RadListView that you could directly bind in the ViewModel.
Solution:
Enhance the DataGridCommand class as a user command and in this way bind it to the defined commands inside ViewModel/ContentPage. - Sample project attached
When a Picker is used in a CellEditTemplate, and when in edit mode, when I click on the arrow of the Picker - the picker does not open. It only opens of I click the text in the Picker.
<DataTemplate x:Key="template1">
<Picker ItemsSource="{Binding Item.Categories}" />
</DataTemplate>
<telerik:RadDataGrid x:Name="dataGrid"
AutoGenerateColumns="False">
<telerik:RadDataGrid.Columns>
<telerik:DataGridTextColumn PropertyName="Name" />
<telerik:DataGridTextColumn PropertyName="Category" CellEditTemplate="{StaticResource template1}" />
</telerik:RadDataGrid.Columns>
</telerik:RadDataGrid>
A work-around is to not use a Picker, but use a RadComboBox.
When navigating to DataGrid examples, xaml binding errors occur for ActualWidth and Header Text.
Still, the app runs as expected.
Hi Team,
I would like to be able to programmatically invoke a ToolTip on a specific cell.
It would be great if you were able to allow us to use a DataGridCellInfo item and string or View content for the tooltip (like UI for WPF allows)
var cellInfo = new DataGridCellInfo(rowToSelect, columnToSelect);
// Option 1 - Quick and easy
var stringContent = "I'm a tooltip";
MyRadDataGrid.ShowTooltip(cellInfo, stringContent);
// Option 2 - For everyone who needs more than just a string.
var customContent = new HorizontalStackLayout();
customContent.Children.Add(new Image{ Source = new FileImageSource{File = "warning.png"}});
customContent.Children.Add(new Label{Text = "I'm a tooltip"});
MyRadDataGrid.ShowTooltip(cellInfo, customContent);
Provide an option to sort the template column by nested property.
For example:
<dataGrid:DataGridTemplateColumn>
<dataGrid:DataGridTemplateColumn.CellContentTemplate>
<DataTemplate>
<Label Text="{Binding MyAddress.City}" />
</DataTemplate>
</dataGrid:DataGridTemplateColumn.CellContentTemplate>
<dataGrid:DataGridTemplateColumn.SortDescriptor>
<dataGrid:PropertySortDescriptor PropertyName="MyAddress.City" />
</dataGrid:DataGridTemplateColumn.SortDescriptor>
</dataGrid:DataGridTemplateColumn>