1. #1
    Sencha User
    Join Date
    Jul 2012
    Posts
    235
    Vote Rating
    0
    chandan.behura is on a distinguished road

      0  

    Default combo reset on selection change

    combo reset on selection change


    Hi ,
    I have a combo for selecting any value from there , some rows of a grid( with selection.checkBodModel) is getting checked for that selected combo value(as i am getting the values to which i have to checked on selection event of the combo).

    Up to that all is fine . But now i want that , if i will make some change in the check boxes(means if i will check/oncheck some rows in the grid ) then the combo should reset.So how i will handel the reset of combo onselection change of grid.

    Code:
    onClickRegion: function(){
            var regionDisplayField = Ext.getCmp('regionTip');
            var selection = Ext.getCmp('regionCheckgridId').getSelectionModel().getSelection();
             var combo =Ext.getCmp('DGPprferenceCombo');
          //here i want to do that, if i will do any changes except the already checked rows(that was for the combo selection) , my combo should reset.
            selectedRegion.length = 0;
            //selectedProcessingRegion = [];
            for ( var i = 0; i < selection.length; i++) {
                selectedRegion.push(selection[i].data.region);
            }
            console.log(selectedRegion);
             regionPopUp.hide();
        },
    I need help on that please help me.

  2. #2
    Sencha - Support Team scottmartin's Avatar
    Join Date
    Jul 2010
    Location
    Houston, Tx
    Posts
    9,085
    Vote Rating
    467
    scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future

      0  

    Default


    When you change the grid, are wanting to change the value of a single combo (eg: toolbar), or the field combo for all the selected records?

    Scott.

  3. #3
    Sencha User
    Join Date
    Jul 2012
    Posts
    235
    Vote Rating
    0
    chandan.behura is on a distinguished road

      0  

    Default


    Quote Originally Posted by scottmartin View Post
    When you change the grid, are wanting to change the value of a single combo (eg: toolbar), or the field combo for all the selected records?

    Scott.
    When the grid will change in the sence that if i will chech/uncheck any pther row then the combo should simply reset i.e the blank text will come in combo.(combo.reset())

  4. #4
    Sencha - Support Team scottmartin's Avatar
    Join Date
    Jul 2010
    Location
    Houston, Tx
    Posts
    9,085
    Vote Rating
    467
    scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future

      0  

    Default


    Simply update the record/field (record.set) and the grid will update as well.

    Scott.

Thread Participants: 1

Tags for this Thread