We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Events from "details" datagrid not firing?

For my windows 10 UWP app: I have a master-details arrangement of two datagrids. I am adding events handlers for the "Loaded" events for both datagrids in my xaml.  The event does fire for the master datagrid but not for the details datagrid (I am showing the details for a particular row).

The other events from the details table are also not firing. I was intending to use this event handler to set the size of a row in the details datagrid. 

Here is a minimal example (ChoicesTable_Loaded is never called).

<syncfusion:SfDataGrid x:Name="OuterTable" 
            ItemsSource="{Binding OuterList}"
            Margin="87,98,79,136" AutoGenerateColumns="True" Loaded="OuterTable_Loaded">
            <syncfusion:SfDataGrid.DetailsViewDefinition>
                <syncfusion:GridViewDefinition RelationalColumn="InnerList">
                    <syncfusion:GridViewDefinition.DataGrid>
                        <syncfusion:SfDataGrid x:Name="ChoicesTable"
                                        AutoGenerateColumns="True"
                                        ItemsSource="{Binding InnerList}"
                                        Loaded="ChoicesTable_Loaded">
                        </syncfusion:SfDataGrid>
                    </syncfusion:GridViewDefinition.DataGrid>
                </syncfusion:GridViewDefinition>
            </syncfusion:SfDataGrid.DetailsViewDefinition>
</syncfusion:SfDataGrid>

Any ideas? Thanks.

1 Reply

SV Srinivasan Vasu Syncfusion Team May 30, 2016 06:01 AM UTC

 Hi Duane, 
 
Thanks for contacting Syncfusion support. 
 
We have analyzed your query and you have to use SfDataGrid.DetailsViewLoading or SfDataGrid.DetailsViewExpanded events in parent DataGrid instead of using DetailsViewDataGrid.Loaded event. 
 
Please refer the below code example. 
 
XAML 
 
  <syncfusion:SfDataGrid  
                               ItemsSource="{Binding Path=OrdersDetails}" 
                               DetailsViewLoading="dataGrid_DetailsViewLoading" 
                               Loaded="dataGrid_Loaded"> 
 
  <syncfusion:SfDataGrid   
                               ItemsSource="{Binding Path=OrdersDetails}" 
                               DetailsViewExpanded="dataGrid_DetailsViewExpanded"  
                               Loaded="dataGrid_Loaded"> 
 
 
 
Sample Location: DetailsViewDataGrid 
 
Regards,
Srinivasan 
 


Loader.
Up arrow icon