retrieve value form window

4 posts, 0 answers
  1. lang dinh thien
    lang  dinh thien avatar
    14 posts
    Member since:
    Aug 2009

    Posted 06 Sep 2009 Link to this post

    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 .
  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 07 Sep 2009 Link to this post

    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.
  3. Georgi Tunev
    Admin
    Georgi Tunev avatar
    7207 posts

    Posted 07 Sep 2009 Link to this post

    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.
  4. lang dinh thien
    lang  dinh thien avatar
    14 posts
    Member since:
    Aug 2009

    Posted 07 Sep 2009 Link to this post

    thank you for helping me. i has solved my problem now. this forum is great ^.^
Back to Top