[CLOSED] Keymap in Desktop Window

Page 2 of 2 FirstFirst 12
  1. #11

    RE: [CLOSED] Keymap in Desktop Window

    Hi Amit,

    1. If you need to intercept Enter key on a TextField then use SpecialKey event

    [quote]specialkey : ( Ext.form.Field this, Ext.EventObject e ) Fires when any key related to navigation (arrows, tab, enter, esc, etc.) is pressed. To handle other keys see Ext.Panel.keys or Ext.KeyMap. You can check Ext.EventObject.getKey to determine which key was pressed.[/CODE]

    For example:

    [CODE]var form = new Ext.form.FormPanel({
    ...
    items: [{
    fieldLabel: 'Field 1',
    name: 'field1',
    allowBlank: false
    },{
    fieldLabel: 'Field 2',
    name: 'field2',
    listeners: {
    specialkey: function(field, e){
    // e.HOME, e.END, e.PAGE_UP, e.PAGE_DOWN,
    // e.TAB, e.ESC, arrow keys: e.LEFT, e.RIGHT, e.UP, e.DOWN
    if (e.getKey() == e.ENTER) {
    var form = field.ownerCt.getForm();
    form.submit();
    }
    }
    }
    }
    ],
    ...
    });

    Listeners will be called with the following arguments:

    this : Ext.form.Field
    e : Ext.EventObject, The event object
    2. About TreePanel
    - id of your tree is 'ca_calendarTree' but in the Click handler of the 'ca_btnSharing' button you use 'calendarTree'
    - unfortunately you did not send code-behind. Do you call SelectNode during initial Page_Load? I found the following script at the end of generated section

    ca_calendarTree.getNodeById("17").select();
    Please note that you cannot select node immediately because nodes are rendered after tree rendering. Therefore you can use AfterRender event

    node = exampleTree.getNodeById(id);     
    node.ensureVisible(function () {
      exampleTree.getNodeById(this.id).select();
    }, node);
    Also if you use tree with drop down field then you can use ValueText mode with SyncValue method. See the following sample Ext.Net.Examples\Examples\Form\DropDownField\Value Text_Mode\

  2. #12

    RE: [CLOSED] Keymap in Desktop Window

    Coool... Thanks...

Page 2 of 2 FirstFirst 12

Similar Threads

  1. [CLOSED] V2.0 DeskTop window
    By Aurelio in forum 2.x Legacy Premium Help
    Replies: 3
    Last Post: Jan 20, 2012, 12:51 PM
  2. [CLOSED] Minimize window created in another desktop window
    By CarWise in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Oct 03, 2011, 1:46 PM
  3. Refreshing desktop control from desktop window
    By AnilVelamuri in forum 1.x Help
    Replies: 0
    Last Post: May 26, 2010, 7:53 AM
  4. KeyMap not working for whole window
    By dbassett74 in forum 1.x Help
    Replies: 3
    Last Post: May 21, 2009, 1:55 PM
  5. Replies: 3
    Last Post: Feb 03, 2009, 5:57 PM

Posting Permissions