Hi,
I am have a UserControl I am using to edit / create records in a RadGrid. This control has a child rad grid in it that will allow users to add / modify related items. These child items need a reference to the parent object (this will be an ID column in the releveant database table). There is no problem when the parent record already exsists( as i have the parent record ID to use in the child ecord insert) but when i add a new record and the user control is in insert mode there is no ID available. What I want to be able to do is trigger the creation of the parent record, retreive the parent record ID and keep the usercontrol open but now in edit mode so that the child grid can be filled in. The creation of the parent record wopuld be on a control event (dropdownlist.slectedindexchanged for example).
The effect I am looking for is as if I did the following actions;
1. add new parent record and fill in data
2. Click insert button and commit parent record to database (thereby creating the parent records ID)
3. Open the parent record for edit
4. add items to child grid (databound to SQL Datasource)
The only other option I can think of is to add records to the grid and then pass back to the parent record creation routine, but i'm not sure how to set up a radgrid to do this.
Thanks in advance for any help you can give me.
Chris
I am have a UserControl I am using to edit / create records in a RadGrid. This control has a child rad grid in it that will allow users to add / modify related items. These child items need a reference to the parent object (this will be an ID column in the releveant database table). There is no problem when the parent record already exsists( as i have the parent record ID to use in the child ecord insert) but when i add a new record and the user control is in insert mode there is no ID available. What I want to be able to do is trigger the creation of the parent record, retreive the parent record ID and keep the usercontrol open but now in edit mode so that the child grid can be filled in. The creation of the parent record wopuld be on a control event (dropdownlist.slectedindexchanged for example).
The effect I am looking for is as if I did the following actions;
1. add new parent record and fill in data
2. Click insert button and commit parent record to database (thereby creating the parent records ID)
3. Open the parent record for edit
4. add items to child grid (databound to SQL Datasource)
The only other option I can think of is to add records to the grid and then pass back to the parent record creation routine, but i'm not sure how to set up a radgrid to do this.
Thanks in advance for any help you can give me.
Chris