This is a migrated thread and some comments may be shown as answers.

Hierarchy of DataGrid

3 Answers 106 Views
DataGrid
This is a migrated thread and some comments may be shown as answers.
Jean-François VIGNERON
Top achievements
Rank 1
Jean-François VIGNERON asked on 05 Jul 2018, 03:26 PM

Hello, 

   Is it possible that i can display a sub group in a DataGrid (as show in the photo)?  I need to show the detail of one line when we clic sur this line.   In WPF we have RadGridView.HierarchyChildTemplate, but i didn't find this with Telerik Xamarin.  

   Could you please give me a exemple ?

3 Answers, 1 is accepted

Sort by
0
Lance | Manager Technical Support
Telerik team
answered on 05 Jul 2018, 06:17 PM
Hello Jean-François,

Currently the DataGrid for Xamarin.Forms doesn't have support for a DetailTemplate. The feature request has been approved, you can up-vote and follow it here: DataGrid: Add support for hierarchy/row details.

In the meantime, as an alternative, you can bind the SelectedItem (or use SelectionChanged) to update an external area to show the details. For example:

<Grid>
    <Grid.RowDefinitions>
        <RowDefinition />
        <RowDefinition Height="Auto" />
    </Grid.RowDefinitions>
 
    <dataGrid:RadDataGrid SelectedItem="{Binding MySelectedItem, Mode=TwoWay}" />
 
    <StackLayout BindingContext="{Binding MySelectedItem}"
           Grid.Row="1">
        <Label Text="{Binding Title}" />
    </StackLayout>
</Grid>

Regards,
Lance | Tech Support Engineer, Sr.
Progress Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Jean-François VIGNERON
Top achievements
Rank 1
answered on 06 Jul 2018, 08:27 AM

Hello, 

 

   I have a RadDataGrid with the columns like this, but the event "SelectionChanged" isn't fired. 

<telerikGrid:RadDataGrid x:Name="rdgW2S" AutoGenerateColumns="False"  GridLinesVisibility="None"   UserSortMode="None" UserFilterMode="Disabled" UserGroupMode="Disabled" UserEditMode="None"  SelectionChanged="rdgW2S_SelectionChanged" SelectionUnit="Row">

 <telerikGrid:RadDataGrid.Columns>

        <telerikGrid:DataGridTemplateColumn HeaderText="Key" >
                   <telerikGrid:DataGridTemplateColumn.CellContentTemplate>
                            <DataTemplate>
                                        <Grid Padding="0,5">
                                                            <Label Text="{Binding Key}"  VerticalOptions="Center" TextColor="Black" />
                                          </Grid>
                             </DataTemplate>
               </telerikGrid:DataGridTemplateColumn.CellContentTemplate>
      </telerikGrid:DataGridTemplateColumn>

 </telerikGrid:RadDataGrid.Columns>

</telerikGrid:RadDataGrid>

0
Lance | Manager Technical Support
Telerik team
answered on 06 Jul 2018, 07:33 PM
Hi Jean-François,

So that we can provide support in a faster and more reliable manner, please open new support tickets for different issues. The selection not working is a different problem than a DataGrid DetailTemplate (even though I mentioned selection as a temporary workaround). 

You can continue to use the public forums for the new questions, however your Priority Support license provides you with guaranteed 24 hr response time and I recommend that you post your issues in a Support Ticket if you need a speedy fix. We try our absolute best to monitor the forums and provide timely responses, but this is limited by available resources and can take up to a few days (not including weekends).

Platform Specifics

Additionally, because this is Xamarin.Forms and there are many moving parts, when reporting issues like this we need specific information about your environment in order to test and reproduce the problem. For example:

- What version of Xamarin.Forms are you using?
- What platform is the problem occurring on?
- What SDK version of that target platform are you compiling with?
- Is this in an emulator or physical device?

Sometimes, it's easier for you to send a reproducible project as answers to everything are already in the project configuration.

Next Steps

For your convenience, I have already opened a ticket for you and transferred your problem details into the ticket. I will reply there after I'm done testing this against the last versions available (it's not feasible to test against all available platform and SDK versions, unless you specific a particular one for us to repro on).

For any future issues, you can open support tickets using this link and fill in the project details (there are boxes to add the info). With this we can immediately test on the problematic platform/SDK and get back to you very quickly.

Thank you for your patience and understanding, I'll get back to you in the ticket as soon as I'm done testing.

Regards,
Lance | Tech Support Engineer, Sr.
Progress Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
DataGrid
Asked by
Jean-François VIGNERON
Top achievements
Rank 1
Answers by
Lance | Manager Technical Support
Telerik team
Jean-François VIGNERON
Top achievements
Rank 1
Share this question
or