Behavior on MacCatalyst:
1. Enter in Edit mode in any cell
2. Press Enter
3.Value is committed, but not moved to the next row
Additional note: The KeyDownCommand execute method does not fire on MacCatalyst when cell is in edit mode and Enter is pressed.
This is how it works on Windows
1. Enter in Edit mode in any cell
2. Press Enter
3. Values is committed and the current cell is moved to the next row cell in edit
When cell is in edit mode, pressings enter key calls infinitely CommitEdit Execute method in custom scenario.
1. When new item is added to the DataGrid source, the cell goes in edit mode
2. Pressing enter key executes additional logic and CommitEdit Execute method calls infinitely.
Workaround:
Inside the CommitEdit CanExecure method, call the default can execute logic
public override bool CanExecute(object parameter)
{
return this.Owner.CommandService.CanExecuteDefaultCommand(DataGridCommandId.CommitEdit, parameter);
//return true;
}
If a user changes an editable cell's value and then hit Tab, and the next cell to the right is not editable. Furthermore, the DataGrid enters into a state where no cells can be edited.
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;
});
}
I want to exit edit mode and commit edit when hitting on Enter Key.
It works great for text column/cell.
But it does not work for numerical cellsHi Team,
If the cell is frozen, the HitTestService.CellInfoFromPoint( ) method always returns null
Thank you,
Jia
TapGestureRecognizer not working correctly when tapping inside the DataGrid control on iOS and MacCatalyst platforms.
Workaround:
You could use CellTap or CellDoubleTap commands of the DataGrid control. Here are the links to our documentation articles: DataGrid Commands and DataGrid CellTap Command.
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.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.
IsCaseSensitive property doesn't work in the DataGrid control.
Workaround: Use Programmatic Filtering
Disable the built in filtering UI and apply a custom UI with programmatic filtering.
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
1. filter the column by any distinct value
2. The filter is applied
3. Open the same filtering again and tap reset
4. All rows are visible and everything is ok
5. Open the same filtering again
The Checkbox from step 1 is still checked and checking any other checkbox and applying filtering does not work
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.
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