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

RadGrid, add row via java script.

1 Answer 81 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Cary
Top achievements
Rank 2
Cary asked on 09 Oct 2008, 07:27 PM

Hi, I have a database in which we collect some customer information for RMA's. I have it setup so that they can add multiple phone numbers and those numbers are displayed in a grid. The only problem is that when they go to add an RMA they either have to save the record and then enter in the phone numbers, or they insert the numbers without a valid FK. How can I enter the information to a grid and then on the form submit pull out this information and actually submit it with a valid ID?

 

Table layout.

RMA table
RmaId
DateEntered
etc etc.

RMAPhone Table
RmaPhoneId
RmaId
PhoneType
PhoneNumber
PhoneExtension

 I am using the Telerik RAD AJAX Grid. I think it would be best to add the row's via JavaScript and then on the main form save go behind and grab each row but I'm usure how to actually accomplish this.

Thank you!


1 Answer, 1 is accepted

Sort by
0
Yavor
Telerik team
answered on 14 Oct 2008, 07:33 AM
Hello Cary,

While the control cannot have more then one insert form at a time, one possible approach in this case is to insert the records directly to the unserlying datasource, and then put these items in edit mode. Once all the required data is entered, you can perform a batch update.

Greetings,
Yavor
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Grid
Asked by
Cary
Top achievements
Rank 2
Answers by
Yavor
Telerik team
Share this question
or