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
close icon

SfDataGrid DetailsView update

I have a SfDataGrid.

Usually "Children" property is empty ObservableCollection<...>
And expand-marker is hidden (HideEmptyGridViewDefinition="True");
But sometimes some entities was added in "Children".
And expand-marker is stay be hidden((( And it's appears only when I scroll or resize window (grid).
Can I invalidate grid in this case? Or can I swich some property that grid was updating properly?

<sf:SfDataGrid x:Name="grid"
                   ItemsSource="{Binding Items}"
                   HideEmptyGridViewDefinition="True"
                   ShowGroupDropArea="False"
                   AllowEditing="True">
        
        <sf:SfDataGrid.Columns>
            ...
        </sf:SfDataGrid.Columns>
        <sf:SfDataGrid.DetailsViewDefinition>
            <sf:GridViewDefinition RelationalColumn="Children">
                <sf:GridViewDefinition.DataGrid>
                    <sf:SfDataGrid x:Name="FirstDetailsViewGrid">
                        <sf:SfDataGrid.Columns>
                            ...
                        </sf:SfDataGrid.Columns>
                    </sf:SfDataGrid>
                </sf:GridViewDefinition.DataGrid>
            </sf:GridViewDefinition>
        </sf:SfDataGrid.DetailsViewDefinition>
    </sf:SfDataGrid>

1 Reply

JG Jai Ganesh S Syncfusion Team December 11, 2013 12:49 PM UTC

Hi Pavel,

 

Thanks for using Syncfusion products,

 

We have analyzed your query. We are able to reproduce the reported issue by not refreshing UI when adding the ItemSource to the children. However, you can meet your requirement  by writing the UpDateDataRow() method when calling the ItemSource. Please find the following code snippet to illustrate this:

 

Code Snippet [ Xaml]:

 

 

using Syncfusion.UI.Xaml.Grid.Helpers;

 

this.dataGrid.UpdateDataRow(rowIndex);

 

 

Please let us know if you need further assistance,

 

Thank you,

Jai Ganesh S


Loader.
Live Chat Icon For mobile
Up arrow icon