Available in minor release 2018.2.821. It will also be available in the R3 2018 release.
When defining TextColumns with a CellStyleSelector, it works correctly the first time the DataGrid is bound to the ItemsSource. If you then update the bound collection (which has PropChanged wired up), the CellStyleSelector's SelectStyle method is properly executed, but the DatasGrid doesn't use the returned DataGridBorderStyle. iOS - Works as expected UWP - Background color doesn't update Android - Background color doesn't update Find reproducible attached Available in the R2 2018 release.
Available in the R1 2018 SP release.
<
grid:RadDataGrid.GroupHeaderTemplate
>
<
DataTemplate
>
<
Label
Text
=
"{Binding Group.Key}"
/>
</
DataTemplate
>
</
grid:RadDataGrid.GroupHeaderTemplate
>
<
telerikDataGrid:DataGridTemplateColumn
HeaderText
=
"Name"
>
<
telerikDataGrid:DataGridTemplateColumn.CellContentTemplate
>
<
DataTemplate
>
<
Label
Text
=
"{Binding Name}"
/>
</
DataTemplate
>
</
telerikDataGrid:DataGridTemplateColumn.CellContentTemplate
>
</
telerikDataGrid:DataGridTemplateColumn
>
The BindingContext of the RadDataGrid does not propagate to its columns. Available in minor release 2017.3.1214. It will also be available in the R1 2018 release.
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
Programmatically changing column width does not reflect on the UI when the width value is lower than the current width value.
No issues when increasing the value, the UI is updated