DataGrid Selection Issue

0 Answers 79 Views
DataGrid
Angelica
Top achievements
Rank 1
Iron
Angelica asked on 28 Aug 2023, 12:29 PM

Good morning,

We are using the Telerik DataGrid in a .NET MAUI project. When I first navigate to the page, I am able to select the rows with no issue. When I go to a different tab (or different page), and then navigate back to the page where the DataGrid was, I am no longer able to make any selections to the row unless I add or remove an item from the ItemSource. Any suggestions?


  <telerik:DataGridColumnHeaderStyle x:Key="HeaderStyle"
                                     BackgroundColor="#0081C6"
                                     TextColor="White"
                                     HoverBackgroundColor="#0081C6"
                                     TextFontSize="16"
                                     TextFontAttributes="Bold"/>
  <telerik:DataGridBorderStyle x:Key="SelectedBackground"
                       BackgroundColor ="#EEEEEE"/>
  <telerik:DataGridBorderStyle x:Key="MouseHoverStyle"
                       BackgroundColor="Transparent"/>


  <telerik:RadDataGrid x:Name="SetInformationDataGrid" AutomationId="SetInformationDataGrid" UserGroupMode="Disabled"
                       ItemsSource="{Binding ConcreteCylinderSampleInfo.SetInformationList}" 
                       AutoGenerateColumns="False"
                       SelectionMode="Multiple" HeightRequest="300"
                       MouseHoverStyle="{StaticResource MouseHoverStyle}" SelectionStyle="{StaticResource SelectedBackground}">
      <telerik:RadDataGrid.Columns>
          <telerik:DataGridTextColumn  PropertyName="Order" HeaderText="#" CanUserEdit="False" CanUserGroup="False"  CanUserFilter="False" CanUserSort="False" HeaderStyle="{StaticResource HeaderStyle}"/>
          <telerik:DataGridTextColumn PropertyName="Type" HeaderText="Type"  CanUserEdit="False" CanUserFilter="False" CanUserSort="False" HeaderStyle="{StaticResource HeaderStyle}"/>
          <telerik:DataGridTextColumn PropertyName="DisplayAge" HeaderText="Age" CanUserEdit="False" CanUserFilter="False" CanUserSort="False" HeaderStyle="{StaticResource HeaderStyle}"/>
      </telerik:RadDataGrid.Columns>
  </telerik:RadDataGrid>

Didi
Telerik team
commented on 28 Aug 2023, 12:32 PM

Hi Angelica,

Could you please send us the complete page definition where the control is defined? the behavior may occur if the DataGrid is added in a StackLayout, ScrollView.

No answers yet. Maybe you can help?

Tags
DataGrid
Asked by
Angelica
Top achievements
Rank 1
Iron
Share this question
or