filtering can no longer be applied as the "Reset" and "Filter" buttons are disappeared.
workaround use Xamarin.Forms v 4.8.0.1269
If you use a TrueType font for the DataGrid column's OptionsButtonFontFamily, it is not respected and falls back to a default OS font.
The only workaround at this time is to create a custom column HeaderTemplate with a custom options button and hide the default options button.
<dataGrid:RadDataGrid x:Name="dataGrid" ...>
<dataGrid:RadDataGrid.Columns>
<dataGrid:DataGridTextColumn x:Name="productNameColumn" PropertyName="ProductName">
<dataGrid:DataGridTextColumn.HeaderContentTemplate>
<DataTemplate>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<Label Text="Name" TextColor="Black"/>
<Label FontFamily="MyCustomFont.ttf#MyCustomFont"
Text=""
TextColor="Orange" HorizontalOptions="End" HorizontalTextAlignment="End" Grid.Column="1">
<Label.GestureRecognizers>
<TapGestureRecognizer Tapped="TapGestureRecognizer_Tapped"/>
</Label.GestureRecognizers>
</Label>
</Grid>
</DataTemplate>
</dataGrid:DataGridTextColumn.HeaderContentTemplate>
<dataGrid:DataGridTextColumn.HeaderStyle>
<dataGrid:DataGridColumnHeaderStyle OptionsButtonFontSize="0" FilterIndicatorFontSize="0"/>
</dataGrid:DataGridTextColumn.HeaderStyle>
</dataGrid:DataGridTextColumn>
</dataGrid:RadDataGrid.Columns>
</dataGrid:RadDataGrid>
In the code-behind, we use reflection to access the column's command context and invoke the options menu via DataGrid command service.
public partial class YourPage : ContentPage
{
private readonly MethodInfo generateOptionsTapContextMethodInfo;
public YourPage()
{
InitializeComponent();
this.generateOptionsTapContextMethodInfo = this.dataGrid.GetType().GetMethod(
"GenerateFilteringCommandContext",
BindingFlags.NonPublic | BindingFlags.Instance);
}
private void TapGestureRecognizer_Tapped(object sender, EventArgs e)
{
if (this.generateOptionsTapContextMethodInfo != null)
{
// Get a reference to the column, this is needed to invoke a command
var context = this.generateOptionsTapContextMethodInfo.Invoke(
this.dataGrid,
new object[] { this.productNameColumn });
// Invoke the command service that opens the options button
this.dataGrid.CommandService.ExecuteDefaultCommand(
Telerik.XamarinForms.DataGrid.Commands.DataGridCommandId.OptionsTap,
context);
}
}
}
if the Flow Direction RTL
the sort of columns changing each time item source changed when customize HeaderContentTemplates as a data template
and if HeaderText ysed instead of customizing label as data template the Arabic letters not shown correctly
Hi,
The DataGrid does support or response to Custom Font set Using the ExportFont Attribute. But when a contentTemplate is used and a label control is place in it. The font shows on the label but not on the Header or Content of the Grid.
When you edit a value of a certain item of the DataGrid and keyboard is displayed, while the focus is still in the input and the row is scrolled away, the keyboard will stay open on Android.
In addition, if you return back to the edited cell, the row will display as if it were on focus, the cell shows the editor underline, the keyboard is still open, but there will be no focus. You will be required to click on the cell to get focus again.
Lastly, only on Android 5.1, if the edited value is a number, when you scroll the cell out of view, the keyboard changes from the numerical to alphanumerical (default).
<Style TargetType="telerikGrid:DataGridColumn">
<Setter Property="HeaderStyle">
<telerikGrid:DataGridColumnHeaderStyle TextFontSize="11" TextFontAttributes="Bold" BorderThickness="1" BorderColor="LightGray"/>
</Setter>
<Setter Property="CellContentStyle">
<telerikGrid:DataGridTextCellStyle FontSize="10"/>
</Setter>
</Style>
The DataGrid has the ability to add custom controls to the cell via Template columns; however, the contents of the cell are always visible and there is no way to distinguish between editing and display modes like you can with the type data columns. Furthermore, it may be desirable to create custom column types as the reusability would be easier than using a template or a template selector.
Currently, the DataGrid columns are public and unsealed; however, much of their internals are marked as internal. For example, overriding the CreateCellArranger method would allow custom editor types when the cell is edited. This would require exposing the CellArranger base classes as well.
Please mark more of the internals as public so that truely custom DataGridColumns can be created.
You can reproduce this by changing input language to any region that uses a comma decimal separator (e.g. Duetsch). The comma is ignored, ultimately corrupting the data
To reproduce:
Step 1 - File > New > LoadOnDemandCollection Demo
Follow the LoadOnDemandCollection documentation https://docs.telerik.com/devtools/xamarin/controls/datagrid/load_on_demand#loadondemandcollection
Step 2 - Deploy to UWP
=> Observe the DataGrid will be stuck in busy state after the initial set of items load