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

open a radwindow on row double click

1 Answer 77 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Ryann
Top achievements
Rank 1
Ryann asked on 08 Oct 2013, 01:51 PM

Hi,

How to open a radwindow on row double click in a radgrid.

Thanks,
Ryan.

1 Answer, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 1
answered on 08 Oct 2013, 01:55 PM
Hi Ryann,

Please try the following code snippet.

ASPX:
<telerik:RadGrid ID="RadGrid1" runat="server" DataSourceID="SqlDataSource1" AllowPaging="True">
    <MasterTableView DataKeyNames="OrderID" AutoGenerateColumns="False" ClientDataKeyNames="OrderID">
        <Columns>
            <telerik:GridBoundColumn UniqueName="OrderID" DataField="OrderID" HeaderText="OrderID" />
            <telerik:GridBoundColumn DataField="ShipCity" HeaderText="ShipCity" UniqueName="ShipCity" />
        </Columns>
    </MasterTableView>
    <ClientSettings>
        <Selecting AllowRowSelect="true"></Selecting>
        <ClientEvents OnRowDblClick="RowDblClick"></ClientEvents>
    </ClientSettings>
</telerik:RadGrid>
<telerik:RadWindowManager ID="RadWindowManager1" runat="server">
    <Windows>
        <telerik:RadWindow ID="RadWindow1" runat="server">
        </telerik:RadWindow>
    </Windows>
</telerik:RadWindowManager>
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:Northwind_newConnectionString3 %>"
    SelectCommand="SELECT * FROM [Orders]"></asp:SqlDataSource>

JS:
<script type="text/javascript">
    function RowDblClick(sender, eventArgs) {
        window.radopen("page.aspx?OrderID=" + eventArgs.getDataKeyValue("OrderID"), "RadWindow1");
    }
</script>

Thanks,
Shinu
Tags
Grid
Asked by
Ryann
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 1
Share this question
or