This is a migrated thread and some comments may be shown as answers.

Cancel edit when expanding hierarchy?

2 Answers 42 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Digital Man
Top achievements
Rank 2
Digital Man asked on 14 Sep 2010, 03:23 PM
Am getting an error when someone tried to click the expand icon next to a row while that row is in edit mode. It seems to be a databinding issue where it's looking for a field in the parent object for the detail object. If I cancel the current edit and then click the expand icon it works fine. What's the best way to solve this? I guess to me it would seem that hiding or disabling the expand icon for the row while in edit mode would be the best. Ideas?

Dan

2 Answers, 1 is accepted

Sort by
0
Iana Tsolova
Telerik team
answered on 14 Sep 2010, 04:01 PM
Hello Dan,

The described behavior is not expected. Furthermore I am not able to replicate it in this demo. Can you check it out and let me know how it goes on your end and what differs in your case?

Additionally, try altering the HierarchyLoadMode property of the MasterTableView/GridTableView and see if the issue persists.

Regards,
Iana
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Digital Man
Top achievements
Rank 2
answered on 14 Sep 2010, 04:26 PM
Ahhh, was my DetailTableDataBind method. I must have pulled this code from an example at one time. For some reason the example code was just returning if the parent item was in edit mode. I commented that part out and works fine now.

        protected void rgData_DetailTableDataBind(object source, GridDetailTableDataBindEventArgs e)
        {
            GridDataItem parentItem = (GridDataItem)e.DetailTableView.ParentItem;

            if (parentItem.Edit)
            {
                return;
            }

             .................
Tags
Grid
Asked by
Digital Man
Top achievements
Rank 2
Answers by
Iana Tsolova
Telerik team
Digital Man
Top achievements
Rank 2
Share this question
or