Results 1 to 3 of 3

Thread: ExtJs 4 - treepanel - determining which column was clicked

  1. #1
    Sencha User
    Join Date
    Dec 2011
    Posts
    22

    Default ExtJs 4 - treepanel - determining which column was clicked

    Hello,
    In a treepanel with several columns, is it possible to determine not only the row but also which column was clicked?

    The API for the treepanel does have an "itemclick" event, which returns a record that corresponds to the clicked "row". But if the treepanel has several columns, how does one detect the specific item in the "row" that was clicked?

    Any advice is much appreciated, thank you.

  2. #2
    Sencha User
    Join Date
    Jan 2012
    Posts
    1,376

    Default

    Let have a try
    Code:
    itemdblclick: function(view, record, item, rowIdx, evt){
        var colIdx = evt.getTarget('.x-grid-cell').cellIndex;
        console.log(colIdx);
    }

  3. #3
    Sencha User
    Join Date
    Dec 2011
    Posts
    22

    Default

    Thank you very much, vietits, that does work!
    I do wish, however, that the next version of ExtJS would have a proper API for it

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
  •