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

Editable hierarchy Grid

4 Answers 197 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Habib
Top achievements
Rank 1
Habib asked on 30 Sep 2014, 10:58 AM
Hello, 
i need a help to use custom command in hierarchy grid. to add, edit and delete parent and child in the same grid.
Could you help me please. 

Thanks

4 Answers, 1 is accepted

Sort by
0
Alexander Popov
Telerik team
answered on 02 Oct 2014, 08:36 AM
Hello Habib,

I am not sure I understand your question correctly. Would you please elaborate? Also, in case you haven't already done so, I would suggest checking the Hierarchy Grid Editing demo.

Regards,
Alexander Popov
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
DHHS
Top achievements
Rank 1
answered on 21 Jul 2015, 04:55 PM

Hi Alexander,

I have used above project and created editable hierarchical grid. Everything is working perfect. I have one issue. When i try to create new record on primary grid (inline), I am getting inline new record where user can type in and update. But I am getting the small expandable arrow where user can click on that see the child grid with no records, but still the user can click on add button add records to child grid which is not acceptable since i still don't have record on my parent table saved. how can i prevent user to click on expandable arrow until the record is saved.

0
Alexander Popov
Telerik team
answered on 23 Jul 2015, 01:57 PM
Hello,

In that case you can subscribe to the master Grid's edit event. Once the event is triggered you can check the isNew state of the edited item and if it is true - find and hide the expand arrow. For example: 
function onEdit(e) {
    if (e.model.isNew()) {
        e.container.find("td.k-hierarchy-cell").css({ visibility: "hidden" });
    }
}


Regards,
Alexander Popov
Telerik
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 Feedback Portal and vote to affect the priority of the items
0
DHHS
Top achievements
Rank 1
answered on 23 Jul 2015, 04:39 PM

Perfect. It works like a charm.

 

Thanks,

Veena

Tags
Grid
Asked by
Habib
Top achievements
Rank 1
Answers by
Alexander Popov
Telerik team
DHHS
Top achievements
Rank 1
Share this question
or