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

Radwindow is not appearing

1 Answer 11 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Dawson
Top achievements
Rank 1
Dawson asked on 10 Sep 2013, 02:11 PM
Hi.
Im trying to open a radwindow on the OnRowDbClick event,but the window is not appearing.
Any idea, why it doesn't show.

Thanks,
Dawson

1 Answer, 1 is accepted

Sort by
0
Jayesh Goyani
Top achievements
Rank 2
answered on 11 Sep 2013, 04:53 AM
Hello,

Please try with the below code snippet.

<script type="text/javascript">
            
            function RowDblClick(sender, args) {
                var IDKey = args.getDataKeyValue("ID");
                var NameColumn = args.get_gridDataItem().get_cell("Name").innerHTML;
                var oWnd = radopen("Default4.aspx?Name=" + NameColumn, "PopupWindow");
            }
        </script>
<telerik:RadScriptManager ID="RadScriptManager1" runat="server">
    </telerik:RadScriptManager>
    <telerik:RadWindowManager ID="RadWindowManager1" runat="server">
    </telerik:RadWindowManager>
     
     
    <telerik:RadGrid ID="RadGrid1" runat="server" AutoGenerateColumns="false" OnNeedDataSource="RadGrid1_NeedDataSource">
        <MasterTableView CommandItemDisplay="Top" DataKeyNames="ID" ClientDataKeyNames="ID">
            <Columns>
                <telerik:GridBoundColumn DataField="Name" UniqueName="Name" HeaderText="Name">
                </telerik:GridBoundColumn>
                <telerik:GridEditCommandColumn>
                </telerik:GridEditCommandColumn>
            </Columns>
        </MasterTableView>
        <ClientSettings>
            <ClientEvents OnRowDblClick="RowDblClick" />
        </ClientSettings>
    </telerik:RadGrid>
protected void RadGrid1_NeedDataSource(object sender, GridNeedDataSourceEventArgs e)
  {
      dynamic data1 = new[] {
             new { ID = 1, Name ="Name_1",FileName = "jayesh-Softweb.jpg"},
             new { ID = 2, Name = "Name_2",FileName = "jayesh-Softweb.jpg"},
             new { ID = 3, Name = "Name_3",FileName = "jayesh-Softweb.jpg"},
             new { ID = 4, Name = "Name_4",FileName = "jayesh-Softweb.jpg"},
             new { ID = 5, Name = "Name_5",FileName = "jayesh-Softweb.jpg"}
         };
 
      RadGrid1.DataSource = data1;
  }

Let me know if any concern.

Thanks.
Jayesh Goyani
Tags
Grid
Asked by
Dawson
Top achievements
Rank 1
Answers by
Jayesh Goyani
Top achievements
Rank 2
Share this question
or