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

[Solved] How to make a rad window appear while double clicking a row in radgrid

2 Answers 169 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Anto (DLL Version : 2008.3.1314.35)
Top achievements
Rank 2
Anto (DLL Version : 2008.3.1314.35) asked on 23 Jun 2009, 11:58 AM
Hi All

I have a rad grid with datas. Just for viewing. It works fine no problem.

I need is:

While double clicking a row in the radgrid I need to open a rad window,

which should contain the information on the row double clicked in the radgird, with a OK button and a CANCEL button.

Is there any optoin to do this.

Thank You

-Anto

2 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 23 Jun 2009, 01:06 PM
Hi Anto,

Attach client-side OnRowDblClick event to radgrid and to open the window and pass the parameter using URL Query String. The parameters that you send can be read from the Request object in the PageLoad method of the page that opened in radwindow.

ASPX:
 
<script type="text/javascript"
function OnRowDblClick(sender, eventArgs) 
   var OrderID = eventArgs.get_gridDataItem().getDataKeyValue("OrderID"); // In order to get the value Set the ClientDataKeyNames as OrderID 
   var oWnd = radopen("MyDialog.aspx?OrderID=" + OrderID, "RadWindow1");  
   oWnd.Center(); 
</script> 

And in the PageLoad event of MyDialog.aspx you can retrieve the passed parameter.

C#:
 
protected void Page_Load(object sender, EventArgs e) 
    if (Request["OrderID"] != null
    { 
        Response.Write(Request["OrderID"]); 
    } 

Checkout the link to know more about Using the URL Query String to Provide Arguments to RadWindow

Thanks,
Shinu.
0
Anto (DLL Version : 2008.3.1314.35)
Top achievements
Rank 2
answered on 24 Jun 2009, 07:22 AM
Hi Shinu

I get a jscript error

Microsoft JScript runtime error: 'get_gridDataItem()' is null or not an object.

If i gieve ignore the radwindow opens with all empty fields in it.

-Anto
Tags
Grid
Asked by
Anto (DLL Version : 2008.3.1314.35)
Top achievements
Rank 2
Answers by
Shinu
Top achievements
Rank 2
Anto (DLL Version : 2008.3.1314.35)
Top achievements
Rank 2
Share this question
or