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

retrieve value form window

3 Answers 65 Views
Window
This is a migrated thread and some comments may be shown as answers.
lang dinh thien
Top achievements
Rank 1
lang dinh thien asked on 06 Sep 2009, 09:04 AM
hi everyone.
my teacher give me a problem. he want me to make a hotkey for radgrid when press this hot key, a radwindow will show up and then this radwindow will return a result for radgird. but a do'nt know how to do that, plz give me away to solve that problem .
thank you .

3 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 07 Sep 2009, 07:23 AM
Hi Lang,

One suggestion would be attaching OnKeyPress event to radgrid and check for the pressed key in the handler to open the RadWindow as shown below.

 
<telerik:RadGrid ID="RadGrid1" runat="server" DataSourceID="SqlDataSource1" GridLines="None"
    <MasterTableView DataSourceID="SqlDataSource1">        
    </MasterTableView> 
    <ClientSettings > 
    <ClientEvents OnKeyPress="OnKeyPress" /> 
    </ClientSettings>     
</telerik:RadGrid> 
 
<telerik:RadWindowManager ID="RadWindowManager1" runat="server"
</telerik:RadWindowManager> 

JavaScript:
 
<script type="text/javascript"
function OnKeyPress(sender, args) 
    if(args.get_keyCode() == 119) // Check for the pressed key code 
    { 
        var oWnd  = radopen ("window.aspx"null); // open window 
    } 
</script> 

Checkout the following links which will help you in passing parameters between dialog page and main page:
Returning Values from a Dialog
Using RadWindow as a Dialog

-Shinu.
0
Georgi Tunev
Telerik team
answered on 07 Sep 2009, 12:15 PM
Hi Lang,

In addition to Shinu's suggestions, I would also recommend to check the Edit Dialog for RadGrid demo.


Best wishes,
Georgi Tunev
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
lang dinh thien
Top achievements
Rank 1
answered on 08 Sep 2009, 03:52 AM
thank you for helping me. i has solved my problem now. this forum is great ^.^
Tags
Window
Asked by
lang dinh thien
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Georgi Tunev
Telerik team
lang dinh thien
Top achievements
Rank 1
Share this question
or