1. #1
    Sencha User
    Join Date
    Apr 2013
    Posts
    3
    Vote Rating
    0
    papouuu is on a distinguished road

      0  

    Default Unanswered: TreeGrid change events of specific cells

    Unanswered: TreeGrid change events of specific cells


    Hello,

    I've search into documentation and forum for a while but didn't found an example or a thread corresponding to my needs.

    In fact i have a TreeGrid with a text column and 3 checkcolumns. I would like to enable or disable others checkbox in same raw i clicked.
    i have this function in my processevent property of my column:

    Code:
    processEvent: function (name, e, grid, rowIndex, colIndex) {
                            if (name == 'mousedown') {
                                var record = e.store.getAt(rowIndex);
                                record.data.gest = !record.data.gest;
                                if (record.data.gest) {
                                    record.data.mod = true;
                                    record.data.pub = true;
                                }
                                e.store.reload();
                                e.panel.view.refresh();
                            }
                        }
    So i can check or uncheck others checkbox but how to disable them only for this raw?

  2. #2
    Sencha - Support Team slemmon's Avatar
    Join Date
    Mar 2009
    Location
    Boise, ID
    Posts
    4,904
    Answers
    369
    Vote Rating
    178
    slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold

      0  

    Default


    The processEvent method passes the record for the clicked checkbox/cell as a param:
    ( type, view, cell, recordIndex, cellIndex, e, record, row )

    I suspect you'll need to inspect the record to see if the peer checkboxes in that same row/record are checked at the time you process the event.

  3. #3
    Sencha User
    Join Date
    Apr 2013
    Posts
    3
    Vote Rating
    0
    papouuu is on a distinguished road

      0  

    Default


    Hi!! Thank You for reply!
    Yes, your solution is wich one i have choosen, on clic on one of the 3 checkbox, i check or uncheck the others.
    It can work as it and it's fine, but it could be better if i could disable click event dynamically.

  4. #4
    Sencha - Support Team slemmon's Avatar
    Join Date
    Mar 2009
    Location
    Boise, ID
    Posts
    4,904
    Answers
    369
    Vote Rating
    178
    slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold

      0  

    Default


    You might be able to use beforeitemclick. You can return false from its handler and that will cancel the click event.

  5. #5
    Sencha User
    Join Date
    Apr 2013
    Posts
    3
    Vote Rating
    0
    papouuu is on a distinguished road

      0  

    Default


    Yes, seems to be the right option too, but in fact I'm not able to access to others cells in the raw.
    if i click on a cell in collumn 1 I want to disable click for same raw on collumn 2 and 3, and from collumn 1, how to access to cell 2 and 3 attributes?

  6. #6
    Sencha - Support Team slemmon's Avatar
    Join Date
    Mar 2009
    Location
    Boise, ID
    Posts
    4,904
    Answers
    369
    Vote Rating
    178
    slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold

      0  

    Default


    The handler for the beforeitemclick event is passed the following parameters: (this, record, item, index, e, eOpts)

    So, in the handler you have access to the record for the row that was just clicked. You can evaluate the values of the fields in columns 1, 2, 3 and if they are checked (or any condition you want to evaluate for that cell/field) you can return true to allow the click or false to cancel it.

Thread Participants: 1

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi