1. #1
    Sencha User
    Join Date
    Feb 2012
    Posts
    31
    Vote Rating
    0
    fenderico is on a distinguished road

      0  

    Default How to catch the menuitem's 'click' event from a controller or a grid panel?

    How to catch the menuitem's 'click' event from a controller or a grid panel?


    Hi,

    I have a controller which handle some events fired by a grid panel, but I don't know how to get the reference to the menu (to sort or group records) displayed when the user clicks on the column header.

    Could somebody tell me how to catch the event 'click' fired by that menu?

    Thanks in advance,

  2. #2
    Sencha User
    Join Date
    Feb 2012
    Posts
    31
    Vote Rating
    0
    fenderico is on a distinguished road

      0  

    Default


    Quote Originally Posted by fenderico View Post
    Hi,

    I have a controller which handle some events fired by a grid panel, but I don't know how to get the reference to the menu (to sort or group records) displayed when the user clicks on the column header.

    Could somebody tell me how to catch the event 'click' fired by that menu?

    Thanks in advance,
    What I need to know is if the user clicks on the sort or group option.

  3. #3
    Sencha - Support Team slemmon's Avatar
    Join Date
    Mar 2009
    Location
    Boise, ID
    Posts
    5,417
    Vote Rating
    201
    slemmon has much to be proud of slemmon has much to be proud of slemmon has much to be proud of slemmon has much to be proud of slemmon has much to be proud of slemmon has much to be proud of slemmon has much to be proud of slemmon has much to be proud of

      0  

    Default


    I would have the controller listen to the sortchange event:
    http://docs.sencha.com/extjs/4.2.1/#...ent-sortchange

    and the groupchange event:
    http://docs.sencha.com/extjs/4.2.1/#...nt-groupchange
    Are you a Sencha products veteran who has wondered what it might be like to work at Sencha? If so, please reach out to our recruiting manager: sheryl@sencha.com

  4. #4
    Sencha User
    Join Date
    Feb 2012
    Posts
    31
    Vote Rating
    0
    fenderico is on a distinguished road

      0  

    Default


    Thanks. How can I stop the store from being loaded when I click on the grouping item in the context menu?

  5. #5
    Sencha User
    Join Date
    Feb 2012
    Posts
    31
    Vote Rating
    0
    fenderico is on a distinguished road

      0  

    Default


    Quote Originally Posted by fenderico View Post
    Thanks. How can I stop the store from being loaded when I click on the grouping item in the context menu?
    I'm using ExtJs 4.1.

  6. #6
    Sencha - Support Team slemmon's Avatar
    Join Date
    Mar 2009
    Location
    Boise, ID
    Posts
    5,417
    Vote Rating
    201
    slemmon has much to be proud of slemmon has much to be proud of slemmon has much to be proud of slemmon has much to be proud of slemmon has much to be proud of slemmon has much to be proud of slemmon has much to be proud of slemmon has much to be proud of

      0  

    Default


    I'm not sure what you're wanting to do. What do you mean by not loading the store? Is the store not loaded at the time you're interacting with the column header / menu?
    Are you a Sencha products veteran who has wondered what it might be like to work at Sencha? If so, please reach out to our recruiting manager: sheryl@sencha.com

  7. #7
    Sencha User
    Join Date
    Feb 2012
    Posts
    31
    Vote Rating
    0
    fenderico is on a distinguished road

      0  

    Default


    Quote Originally Posted by slemmon View Post
    I'm not sure what you're wanting to do. What do you mean by not loading the store? Is the store not loaded at the time you're interacting with the column header / menu?
    I wanted to sort remotely and group locally, but the Store remoteGroup attribute seemed to be ignored until I realized it was not taken into account on Chrome and Chromium (issue [1]). After applying an ugly fix, it started working.

    [1] http://www.sencha.com/forum/showthread.php?259001-GroupField-Forces-Remote-Sort-on-Store-Initialization


Thread Participants: 1

Tags for this Thread