Results 1 to 3 of 3

Thread: Set focus to a tree node

  1. #1
    Sencha User
    Join Date
    Dec 2012
    Posts
    17
    Vote Rating
    0
      0  

    Default Set focus to a tree node

    Any way to set focus to a tree node programmatically?

  2. #2
    Sencha - GXT Dev Team
    Join Date
    Feb 2009
    Location
    Minnesota
    Posts
    2,737
    Vote Rating
    93
      0  

    Default

    What do you mean by focus? Are you trying to edit the cell there? Or select the row?
    To find the element in there (could be useful if doing something with a cell:
    Code:
    TreeNode<MyModel> node = tree.findElement(someModelObject);
    Element elt = tree.getView().getTextElement(node);
    
    //do something with elt
    To just scroll to the element in question:
    Code:
    tree.scrollIntoView(someModelObject);
    To select it:
    Code:
    tree.getSelectionModel().select(someModelObject, false);

  3. #3
    Sencha User
    Join Date
    Dec 2012
    Posts
    17
    Vote Rating
    0
      0  

    Default

    Got it! Thank you. I kept diving into "focus" methods

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •