Please provide the Full Data Grid Column Header Control Template for customization. The DataGrid Column Header content template is useful but we would like full control of the Column Header Control Template.
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
<telerik:RadDataGrid x:Name="dataGrid" AutomationId="dataGrid" AutoGenerateColumns="False">
<telerik:RadDataGrid.Columns>
<telerik:DataGridTextColumn PropertyName="Country" HeaderText="HighlightedLabel">
<telerik:DataGridTextColumn.CellContentTemplate>
<DataTemplate>
<telerik:RadHighlightLabel UnformattedText="{Binding Country}"
HighlightText="{Binding Source={x:Reference searchEntry}, Path=Text}"
HighlightTextColor="Red"/>
</DataTemplate>
</telerik:DataGridTextColumn.CellContentTemplate>
</telerik:DataGridTextColumn>
</telerik:RadDataGrid.Columns>
</telerik:RadDataGrid>
Actual: The highlighted text doesn't get updated and stays the same.
When the selected item is set initially, the selected style is not applied to the row/cell.
Workaround: You can use a Dispatcher to workaround the issue, code looks as follows:
this.Dispatcher.StartTimer(TimeSpan.FromMilliseconds(200), () =>
{
if (dataGrid.SelectedItem == null)
{
dataGrid.SelectItem(viewModel.PersonCollection.First());
}
return false;
});
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
.Net Maui Data Grid Property Aggregator Descriptor incorrect placement on Mac
Run SDKBrowserMaui example on WinUI
Navigate to DataGrid->LoadOnDemandCategory->LoadOnDemandExmaple
Start scrolling the grid using the scrollbar
Crash occurs on WinUI.
I am using NavigationPages and Dependency Injection (for the Pages and ViewModels) to navigate (not AppShell).
<Grid RowDefinitions="*,100">
<telerik:RadDataGrid x:Name="grdRegisters"
RowHeight="50"
Style="{StaticResource ReadOnlyGridStyle}"
ItemsSource="{Binding Registers}"
SelectionStyle="{StaticResource SelectedRowBackgroundStyle}"
RowBackgroundStyle="{StaticResource RowBackgroundStyle}"
AlternateRowBackgroundStyle="{StaticResource AltRowBackgroundStyle}"
SelectedItem="{Binding SelectedRegister, Mode=TwoWay}">
<telerik:RadDataGrid.Columns>
<telerik:DataGridTemplateColumn HeaderText=""
SizeMode="Fixed"
Width="50">
<telerik:DataGridTemplateColumn.CellContentTemplate>
<DataTemplate x:DataType="RegisterModel">
<Label FontFamily="FASolid"
HorizontalOptions="Center"
VerticalOptions="Center"
Text=""
IsVisible="{Binding IsCurrentRegister, Mode=OneTime}"/>
</DataTemplate>
</telerik:DataGridTemplateColumn.CellContentTemplate>
</telerik:DataGridTemplateColumn>
<telerik:DataGridTemplateColumn HeaderText="Shift Date">
<telerik:DataGridTemplateColumn.CellContentTemplate>
<DataTemplate x:DataType="RegisterModel">
<Label Style="{StaticResource GridCellLabelStyle}"
Text="{Binding Date, Converter={StaticResource ToLocalTimeConverter}, StringFormat='{}{0:d}'}"/>
</DataTemplate>
</telerik:DataGridTemplateColumn.CellContentTemplate>
</telerik:DataGridTemplateColumn>
<telerik:DataGridTemplateColumn HeaderText="Shift Name">
<telerik:DataGridTemplateColumn.CellContentTemplate>
<DataTemplate x:DataType="RegisterModel">
<Label Style="{StaticResource GridCellLabelStyle}"
Text="{Binding Shift.Name}"/>
</DataTemplate>
</telerik:DataGridTemplateColumn.CellContentTemplate>
</telerik:DataGridTemplateColumn>
<telerik:DataGridTemplateColumn HeaderText="Start Time">
<telerik:DataGridTemplateColumn.CellContentTemplate>
<DataTemplate x:DataType="RegisterModel">
<Label Style="{StaticResource GridCellLabelStyle}"
Text="{Binding StartTime, Converter={StaticResource ToLocalTimeConverter}, StringFormat='{}{0:t}'}"/>
</DataTemplate>
</telerik:DataGridTemplateColumn.CellContentTemplate>
</telerik:DataGridTemplateColumn>
<telerik:DataGridTemplateColumn HeaderText="End Time">
<telerik:DataGridTemplateColumn.CellContentTemplate>
<DataTemplate x:DataType="RegisterModel">
<Label Style="{StaticResource GridCellLabelStyle}"
Text="{Binding EndTime, Converter={StaticResource ToLocalTimeConverter}, StringFormat='{}{0:t}'}"/>
</DataTemplate>
</telerik:DataGridTemplateColumn.CellContentTemplate>
</telerik:DataGridTemplateColumn>
</telerik:RadDataGrid.Columns>
</telerik:RadDataGrid>
<HorizontalStackLayout Grid.Row="1">
<Button Text="Resume"
IsEnabled="{Binding SelectedRegister, Converter={StaticResource IsNotNullConverter}}"
Command="{Binding ResumeShiftCommand}"/>
<Button Text="Refresh"
Command="{Binding RefreshCommand}"/>
</HorizontalStackLayout>
</Grid>
On initial Refresh, all items are visible in the DataGrid
I navigate forward and then back (PopToRoot), the DataGrid appears empty, although the vertical scroll appears like there are items.
If I tap Refresh, items become visible, but only above the first fold.
If i resize the window vertically, items will appear and disappear depending on the height of the window. (see attached video)
scrolling is not smooth (items jump up/down when scrolling)
Tested on Samsung S9+ and S10