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

How to target BeginInsert to detail level of hierarchy?

2 Answers 42 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Wellpartner
Top achievements
Rank 1
Wellpartner asked on 20 Sep 2010, 10:45 PM
I have a master/detail hierarchy implementation (see attached picture).

I have coded to RowLoaded event to set GridViewRow.IsExpandable = false for master rows whose detail collection is empty.  I wanted to visually show that there were no associated details, and save the user from clicking on the (+) expander control needlessly.  I have set ShowInsertRow="True", and my preference is to keep ShowInsertRow="False".  Instead, I would like to have a button (elsewhere in the UI) to call the BeginInsert() method.  However, how do I target the detail level - particularly if the master row has an empty detail collection?

2 Answers, 1 is accepted

Sort by
0
Maya
Telerik team
answered on 21 Sep 2010, 09:57 AM
Hi Wellpartner,

A possible approach for your case may be to add a specific button for inserting items in the child grid. Thus during its Click event, you may add a new item in the collection, filling up the nested RadGridView.
You may find more information about the method applied in the attached sample project in this blog post.  

All the best,
Maya
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
Wellpartner
Top achievements
Rank 1
answered on 25 Sep 2010, 03:31 PM
Thank you, Maya.
Tags
GridView
Asked by
Wellpartner
Top achievements
Rank 1
Answers by
Maya
Telerik team
Wellpartner
Top achievements
Rank 1
Share this question
or