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

Keep detailTemplate Open with nested data on data update

Hello,


I am attempting to create something similar to the hierarchy grid demo however just using one set of data. Each level of the grid filters the data source and uses a detail template to render a custom component formatted as needed for the data that should be grouped under specific level. Since grouping and a captionTemplate will not work to group and customize components as per this post. See attached project for how I achieve this functionality. This works as intended until the user 1) expands or collapses different detail templates or 2) updates the underlying data which will collapse all templates to the top level.


I have been trying to get something working using the information provided in this post using JSInterop and ExpandCollapseDetailRowAsync however I have been having troubles figuring out how to make this work with the nested DetailTemplates using the same underlying data source.


Any advice on a direction to persist the expanded/collapsed state of nested detail templates that use the same data source on data changes would be very helpful.




Thank you,


Attachment: ServerApp_132d9df2.zip


4 Replies

PS Prathap Senthil Syncfusion Team October 17, 2022 05:15 PM UTC


Hi Leland,


Greetings from Syncfusion support.


Query: “Keep detail Template Open with nested data on data update”


We have analyzed your query and would like to inform you those closing grids while updating are the grid's default behavior. According to your query, it is not possible to keep the expanded state while updating. We suggest that you use the ExpandCollapseDetailRowAsync method to expand the row in the Grid's ActionComplete event once the CRUD operation is complete. Please refer to the attached document link for your reference.


Reference link: https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Grids.SfGrid-1.html#Syncfusion_Blazor_Grids_SfGrid_1_ExpandCollapseDetailRowAsync__0_


Please get back to us if you have any further queries.



Regards,

Prathap s



LE Leland October 17, 2022 07:50 PM UTC

Hello,


Yes I understand that is what is needed to be done as I have looked at the other forums linked in my first post. I think the problem is that I am using one data source for all of the nested detail templates and rendering custom components off of what level it is at. When I bind the top level "OnActionComplete" to an event handler, making one change in the underlying data makes this event fire continuously with out further changes. See attached project and check the console output. Updating one value will make this event fire continuously until the application is closed. 


Attachment: ServerApp_OnActionComplete_492def3e.zip


PS Prathap Senthil Syncfusion Team October 18, 2022 04:52 PM UTC

Hi Leland,


Thanks for the update.

Currently, we are validating your query. Further details will be updated on or before 21 Oct 2022.


Until then we appreciate your patience.


Regards,

Prathap S



PS Prathap Senthil Syncfusion Team October 20, 2022 03:56 PM UTC

Hi Leland,


Thanks for your patience.


We have logged the improvement task for your requirement as To persist the expanded/collapsed state of nested detail templates that use the same data and added it to our feature request database. At the planning stage for every release cycle, we review all open features and identify features for implementation based on specific parameters including product vision, technical feasibility, and customer interest. This feature will be included in any of our upcoming releases. 


You can now track the current status of this request, review the proposed resolution timeline, and contact us for any further inquiries through the below feedback link,


Feedback Link: https://www.syncfusion.com/feedback/29838/support-to-maintain-expand-collapse-state-of-groups-in-grid-during-certain-action




Regards,

Prathap S


Loader.
Live Chat Icon For mobile
Up arrow icon