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

Insert detail record?

3 Answers 78 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Laura
Top achievements
Rank 1
Laura asked on 29 Aug 2008, 06:53 PM
I currently have a radgrid with a master table and a detail table. Above my detail table is a link to add a new item to the table. All that is in the form is the master items. How can I add a button inside that form so I can add a detail record related to that master record? Actually I do not see anywhere on the page where I can add a detail record. So I really would like 2 places to add details. One-inside the master insert form, and 2-when I expand the master to the detail level, I would like the option to add a new record there.

Hope I am explaining myself fully....thanks in advance,
Laura

3 Answers, 1 is accepted

Sort by
0
Vlad
Telerik team
answered on 01 Sep 2008, 12:20 PM
Hi Laura,

Please check this example:
http://demos.telerik.com/aspnet/Prometheus/Grid/Examples/DataEditing/ThreeLevel/DefaultCS.aspx

Sincerely yours,
Vlad
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Princy
Top achievements
Rank 2
answered on 02 Sep 2008, 09:56 AM
Hi Laura,

You can set the EditFormType to Form Template. Design the template so that you
 can  insert the child record from the master form . Check out the following code sample on how to perform insert operation using FormTemplate.

http://demos.telerik.com/aspnet/Prometheus/Grid/Examples/DataEditing/TemplateFormUpdate/DefaultCS.aspx

Thanks,
Princy  
0
Laura
Top achievements
Rank 1
answered on 02 Sep 2008, 06:42 PM
Thanks for the answers....I am on my way. What I ideally would like is for the insert form of the master table to have a button which can be clicked to add detail records. And then have the hierarchary + expand inside the form so you can see all the records for this new record. Let me explain:

I have a provider table(master) and for each provider, you can have a number of contacts. I would like to be able to create a new provider and while in that form, click a button "create new contact" which will then (indented) just show the form for the contacts. Once the user enters the contact, then I would like to see a grid embedded inside the form of all contacts and then when the user clicks ok, the master info is saved.

Is this possible?

Thanks,
Laura
Tags
Grid
Asked by
Laura
Top achievements
Rank 1
Answers by
Vlad
Telerik team
Princy
Top achievements
Rank 2
Laura
Top achievements
Rank 1
Share this question
or