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

If you double-click on the selected grid to another grid line insertion

1 Answer 30 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Yoongu
Top achievements
Rank 1
Yoongu asked on 05 Nov 2014, 01:58 AM
If you double-click on the selected grid appreciated learn how to insert a row in another grid.

 

1 Answer, 1 is accepted

Sort by
0
Konstantin Dikov
Telerik team
answered on 07 Nov 2014, 01:56 PM
Hello Yoongu,

You could handle the client-side OnRowDblClick event of your first grid, use the gridDataItem from the arguments to get the information that you need from the clicked item, get reference to the second grid and manually initiate an insert:
<telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
    <script type="text/javascript">
        function rowDblClick(sender, args) {
            var clickedRow = args.get_gridDataItem();
            var secondGrid = $find("<%=RadGrid2.ClientID%>");
 
            // initiate insert for the second grid
            //...
        }
    </script>
</telerik:RadCodeBlock>
 
<telerik:RadGrid runat="server" ID="RadGrid1" OnNeedDataSource="RadGrid1_NeedDataSource">
    <ClientSettings>
        <ClientEvents OnRowDblClick="rowDblClick" />
    </ClientSettings>
</telerik:RadGrid>
 
<telerik:RadGrid runat="server" ID="RadGrid2" OnNeedDataSource="RadGrid2_NeedDataSource">
</telerik:RadGrid>

The approach for initiating insert will differ, depending on the edit mode that you are using, so I could suggest that you go through our documentation and see how to initiate an insert with your current edit mode.

Hope this helps.


Regards,
Konstantin Dikov
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
Yoongu
Top achievements
Rank 1
Answers by
Konstantin Dikov
Telerik team
Share this question
or