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

Insert rows in a RadGrid to another RadGrid using JavaScript

1 Answer 67 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Faustino
Top achievements
Rank 1
Faustino asked on 13 Nov 2014, 04:56 AM
I hope you can help me

how I can insert a selected row of a RadGrid on another RadGrid using JavaScript

I have many problems understanding JavaScript, since I'm new to JavaScript programming

Thank you for your help

1 Answer, 1 is accepted

Sort by
0
Angel Petrov
Telerik team
answered on 17 Nov 2014, 03:34 PM
Hi Faustino,

The implementation behind this requirement depends solely on the way the grid is bound.

If server-side binding is used the only thing that you need to do from the client is to trigger an AJAX request or postback. Later on the server you can obtain a reference to the selected item of the grid, include it in the data source of the second one and rebind it.

In the other case where client-side binding is used you can obtain a reference to the selected item from the selected items collection,
var selectedItem = $find('<%=RadGrid1.ClientID%>').get_masterTableView().get_selectedItems()[0];
again include it in the data source of the second and call .rebind() for the master table view object.

If the above suggestion does not prove helpful I would like to ask you to share with us the page contents so we could examine the setup and provide a more precise suggestion.

Regards,
Angel Petrov
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.

 
Tags
Grid
Asked by
Faustino
Top achievements
Rank 1
Answers by
Angel Petrov
Telerik team
Share this question
or