I am editing parent and child records in the hierarchy grid. I can edit parent and child records without issue. The only problem I have now is this; when I click edit on a child record, then collapse the parent, the edit of the child record is lost or cancelled but there is no event I can see to use to put things back in non-edit mode.
I enable buttons and links in non-edit (view) mode and disable them when editing a record.
So, is there an event or some way to know the user is collapsing or expanding a parent record?
Thank you,
Indeed, Gary, there are flags outside of the detail template that act as state that will be maintained across expand/collapse.
I am attaching here a sample app I made for you that shows the concept of a workaround:
Regards,
Marin Bratanov
Progress Telerik
I'm including a page with self supporting data.
I disable all buttons in edit mode. In the end they are left disabled and I'm not sure how I can make this work. Any advice would be appreciated.
1. Open the form and expand the parent record.
2. Click "Edit" on the child record. you will see the buttons are all disabled except "Save".
3. Collapse the parent.
4. Expand the parent. I am left with all buttons disabled. The only option is to refresh the page.
Hello Gary,
At this point such an event does not exist and I moved your request to the Feedback Portal where you can Follow its implementation: https://feedback.telerik.com/blazor/1454356-event-when-hierarchy-in-the-grid-is-collapsed-or-expanded
Could you provide some more details on the issue you are facing with this setup? I am asking because the built-in editing in the grid should not have issues - when the detail template is closed, the components in it will no longer be rendered and they should not maintain any editable state. If you do persist some state through the grid events (say, OnEdit) and that data "lives" on as it is in the parent model, when the child grid is rendered again it should already use that state without issue.
Regards,
Marin Bratanov
Progress Telerik