Assain a "code behind" function to a key?

  1. #1

    Assain a "code behind" function to a key?

    Hi
    Is it possible to assign a certain code behind function to a key press depending on which object that has the focus.
    The code demostrates what I want to do, the OnKey evens is made up but shows my intentions.

    
    
    
    protected string CodeBehindFunction(){
    }
    
    
    
    <ext:TextField ID="TextField1" runat="server" OnKey="CodeBehindFunction()"> </ext:TextField>

    Best regards
    Mikael Jürke
  2. #2

    RE: Assain a "code behind" function to a key?

    Hi Mikael,

    Adding events to certain key(s) combinations is very much possible in ExtJS, although we have yet to build in the functionality to the Coolite Toolkit source so that you can add programaticly with code-behind or markup.


    Can you explain further what key/combination scenario you would like to enable?


    There was a good blog post recently presenting some information about adding a KeyMap, see*http://extjs.com/blog/2008/09/23/keyboard-handling/


    Geoffrey McGill
    Founder
  3. #3

    RE: Assain a "code behind" function to a key?

    Hi again,
    I need to call a codebehind function from a keybutton, therefor i can not use the ExtJS, (at least not with my limited knowledge of javascript). I would like to enable "enter"-key when I stand in a ext:TextField and then call a function. I also would like enable combinations like "alt+a" or "alt+b" ect..
    In the program in building im using, the viewport. And in this viewport area there are several buttons. Instead of clicking them with the mouse, I would like to access them with keycombos like "alt+a".
    Hope you get what I need?

    Best regards
    Mikael Jürke

Similar Threads

  1. [CLOSED] Calling a code-behind function from my aspx page
    By Bert76 in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Jul 08, 2011, 3:53 PM
  2. How to call the javascript function form code behind
    By harshad.jadhav in forum 1.x Help
    Replies: 3
    Last Post: Mar 29, 2011, 3:00 PM
  3. Replies: 1
    Last Post: Dec 21, 2010, 8:49 AM
  4. how to call code behind function through grid
    By harshad.jadhav in forum 1.x Help
    Replies: 1
    Last Post: Jul 10, 2010, 9:01 AM
  5. Replies: 4
    Last Post: Oct 20, 2009, 6:43 PM

Posting Permissions