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

Nested Master-Details datagrid style

Hi,
On SfDataGrid product presentation, i have read that the master-detail hierarchy supports unlimited levels.

From product presentation:
"The Datagrid can display related information through hierarchies. The master-detail relationship is represented through nested grids which can be expanded and collapsed as required. The details view can also enable functionality like sorting and filtering. It is also possible to interact with and edit data within the child grid as you would with the parent grid. The Datagrid control’s flexible and powerful architecture also supports unlimited levels of nesting. "

I have problems on applying the style from second level onwards.
Only the first level of detail takes the implicit style.

Another problem is that the "CollapseAllDetailsView()" works only on first datagrid.
From third level onwards, when trying to expand the details, the app crashes with Layout Cycle error.

I have attached a sample demo app with manifest to complete the Identy part and without signing certificate.



Thanks in advance.



Attachment: DataGridSample_34afbb84.zip

3 Replies

MM Muthalagu M Syncfusion Team May 6, 2015 02:25 AM UTC

Hi Nicu,


Thank you for contacting Syncfusion support,


Regarding Query1:

We have checked with your sample. You have set the Style for DetailsViewDataGrid. But you did not set the Style for SecondLevelGrid. So only the style does not apply for the second level grid. If you set the style for SecondLevelDataGrid , it will be applied without any issue.


Code snippet[XAML]:

<grid:GridViewDefinitionRelationalColumn="Level3Items">
<grid:GridViewDefinition.DataGrid>
<grid:SfDataGridAutoGenerateColumns="True"Style="{StaticResourceDefaultStyle}">
</grid:SfDataGrid>
</grid:GridViewDefinition.DataGrid>
</grid:GridViewDefinition>


Regarding Query2:

We are able to collapse the DetailsView using CollapseAllDetailsView method for all the level. We suspect that you have called CollapseAllDetailsView for the grid defined in the GridViewDefiniton by using that grid name. If so, CollapseAllDetailsView method will not work since this grid will not be in view. If you want to call CollapseAllDetailsView for DetailsViewDataGrid, you need to get the DetailsViewDataGrid from GetDetailsViewGrid and call CollapseAllDetailsView method. So could you please let us know how you are Collapsing the DetailsViewDataGrid in your side? Please refer the below code snippet to get the DetailsViewDataGrid.


Code snippet[C#]:

privatevoidButton_Click(objectsender,RoutedEventArgse)
{
vardetailsviewGrid =this.DataGrid.GetDetailsViewGrid(2,"Level2Items");
detailsviewGrid.CollapseAllDetailsView();

}


Regarding Query3:

We are unable to reproduce the reported issue in our side. We have expanded the DetailsViewDataGrid upto third level and also collapsed the DetailsViewDataGrid. But we could not get any exception in our side. Could you please let us know the exact replication procedure and stack trace information with us? It would be helpful for further analysis. We have attached a video file and you can download it from following location.

Video:VideoFile.zip

Please let us know if you have any other queries.

Regards,
Muthalagu



NV Nicu Vlad May 6, 2015 10:05 AM UTC

Hi.
Thanks for your reply.
However the the problems persist.

Regarding Query 1:
I sended a wrong sample. I've changed my sample project with the style applied.
The style indeed is working, but not the columsizer.
If you open the sample xaml will see that style have an "Star" columnsizer.
When the 3 level is exapanded the columns is ok until you scroll/expand another detail.

Regarding Query 2:
I use behavior in order to collapse all details except the one who should stay exapaned.
Please see my sample code.

Regarding Query 3:
On your video, you expand a single detail on 3 level.
Try to expand on same parent level the second detail while first is expanded.
See video on attached file.


Best regards.


Attachment: DataGridSample_b761301c.zip


JG Jai Ganesh S Syncfusion Team May 8, 2015 01:07 PM UTC

Hi Nicu,

Thank you for the update.

We have analyzed your queries and please find the responses for your queries as follows:

Query

                                      Response

The style indeed is working, but not the columsizer.

We are able to reproduce the issue “Column size is changed when we scroll or expand the details view grid” and we have logged a defect report on this. A support incident to track the status of this defect has been created under your account. Please log on to our support website to check for further updates,

 https://www.syncfusion.com/account/login?ReturnUrl=%2fsupport%2fdirecttrac%2fincidents

 

 

CollapseAllDetailsView() works only on first datagrid.

As we said in our previous update, we are able to collapse the DetailsView using CollapseAllDetailsView method for all the level in the version 13.1. But you mentioned your update to use behavior in order to collapse all details. So could you please share your code for how to call the CollapseAllDetailsView method in your application and share the exact version you have used? This would be more helpful for us to serve you in better way.

Video Link: http://www.syncfusion.com/downloads/support/directtrac/138668/CollpaseGrid1012442270.zip

 

From third level onwards, when trying to expand the details, the app crashes with Layout Cycle error.

We are unable to reproduce the issue when we expand the grid in 13.1 version and we couldn’t find any video to replicate the reported issue from your update. Could you please share the video for the reported issue and also update the exact version you have used?

Video Link: http://www.syncfusion.com/downloads/support/directtrac/138668/ExpandGrid1168305984.zip

 

 

Please let us know if you have any other queries.

 

Thank you,

Jai Ganesh S


Loader.
Live Chat Icon For mobile
Up arrow icon