Tabbed Mutliple DetailView's in Master-Detail Relationships

Hello,

I am trying to see if it is possible to display multiple detailViews opposed to having them show up stacked as they do in the default configuration. Is this possible to edit a custom template of the dataGrid? If so does any supporting documentation exist to do this?

Thanks,

Jordan


6 Replies

SS Sampathnarayanan Sankaralingam Syncfusion Team December 21, 2021 04:50 PM UTC

Hi Jonathan, 

We are checking the possibilities to achieve your need. We will update you on December 23, 2021. 

Regards, 
Sampath Narayanan.S 



SS Sampathnarayanan Sankaralingam Syncfusion Team December 23, 2021 12:02 PM UTC

  
Hi Jonathan, 

There is no direct support to have  multiple DetailView in TabView. However you can achieve this using the RecordTemplateView. Please refer below UG link for more details. 


We have achieved your need. Please find the below code snippet 

<Window.Resources> 
    <DataTemplate x:Key="DetailsViewTemplate"> 
        <Grid> 
            <TabControl> 
                <TabItem Header="Datagrid1"> 
                    <syncfusion:SfDataGrid x:Name="FirstDetailsViewGrid" ItemsSource="{Binding Data.OrderDetails}" ColumnSizer="Star"> 
                    </syncfusion:SfDataGrid> 
                </TabItem> 
                <TabItem Header="Datagrid1"> 
                    <syncfusion:SfDataGrid x:Name="SecondDetailsViewGrid" ItemsSource="{Binding Data.SalesDetails}" ColumnSizer="Star"> 
                    </syncfusion:SfDataGrid> 
                </TabItem> 
            </TabControl> 
        </Grid> 
    </DataTemplate> 
</Window.Resources> 
 
<syncfusion:SfDataGrid.DetailsViewDefinition> 
    <syncfusion:TemplateViewDefinition  RowTemplate="{StaticResource DetailsViewTemplate}"/> 
</syncfusion:SfDataGrid.DetailsViewDefinition> 

 
Regards, 
Sampath Narayanan.S 



JR Jonathan Rogers December 23, 2021 08:27 PM UTC

Thank you so much for your help! 

Cheers



SS Sampathnarayanan Sankaralingam Syncfusion Team December 28, 2021 08:05 AM UTC

Hi Jonathan,  
 
Please let us know if you need any other assistance. We will be happy to assist you. 
 
Regards, 
Sampath Narayanan.S 



VP Vinod Panchal September 23, 2024 02:45 AM UTC

Is there an example for same in sfdatagrid winform ? Thank you



SG Santhosh Govindasamy Syncfusion Team September 23, 2024 09:56 AM UTC

Hi Jonathan Rogers,

Thank you for your response.


We would like to inform you that we do not load controls in WinForms, so we cannot load multiple DetailView grids in the WinForms DataGrid like the RecordTemplateView supports in the WPF DataGrid.

For your reference, we have attached the user guide link for handling "masterdetailsview."

https://help.syncfusion.com/windowsforms/datagrid/masterdetailsview


Thanks for your cooperation and understanding this.

Regards,
Santhosh.G


Loader.
Up arrow icon