[CLOSED] Multicombo bug ? Unchecking items

Page 1 of 2 12 LastLast
  1. #1

    [CLOSED] Multicombo bug ? Unchecking items

    Mmm.. why can't I uncheck items in a multicombo anymore ? (in the examples with checkboxes)

    Check your own demopage: https://examples2.ext.net/#/Form/ComboBox/MultiCombo/


    They dissapear in the combo, but the checkboxes are still checked.

    I checked it on Mozilla, Chrome and IE 10


    Martin
    Last edited by Daniil; May 17, 2013 at 11:14 AM. Reason: [CLOSED]
  2. #2
    Hi Martin,

    Thank you for the report! But as far as I can remember it has been fixed in SVN already.
  3. #3
    Quote Originally Posted by CarWise View Post
    Mmm.. why can't I uncheck items in a multicombo anymore ? (in the examples with checkboxes)

    Check your own demopage: https://examples2.ext.net/#/Form/ComboBox/MultiCombo/


    They dissapear in the combo, but the checkboxes are still checked.

    I checked it on Mozilla, Chrome and IE 10


    Martin
    Sorry Guys..

    Just discovered older post. Going to update SVN

    Martin
  4. #4
    Quote Originally Posted by Daniil View Post
    Hi Martin,

    Thank you for the report! But as far as I can remember it has been fixed in SVN already.
    Don't you need to update your own example site ? :)

    Martin
  5. #5
    It requires updating dlls. So, we will probably leave it as is till the next release.
  6. #6
    Quote Originally Posted by Daniil View Post
    It requires updating dlls. So, we will probably leave it as is till the next release.
    I understand. You can close the thread :)
  7. #7

    Please post the solution

    Please post the solution

    Click image for larger version. 

Name:	Capture.PNG 
Views:	51 
Size:	29.7 KB 
ID:	6317
    Last edited by gappov; Jun 04, 2013 at 5:39 PM.
  8. #8
    Here you are.

    Fix
    Ext.net.MultiCombo.override({
        getPicker : function () {        
            if (!this.picker) {
                this.listConfig = this.listConfig || {};
    
                if (!this.listConfig.getInnerTpl) {
                    this.listConfig.getInnerTpl = function (displayField) {
                        return  '<div class="x-combo-list-item {[this.getItemClass(values)]}">' +                      
                                '<div class="x-mcombo-text">{' + displayField + '}</div></div>';
                    };
                }
    
                this.listConfig.selModel = {
                    mode: 'SIMPLE'
                };            
    
                this.picker = this.createPicker();
    
                this.mon(this.picker.getSelectionModel(), 'select', this.onListSelect, this);
                this.mon(this.picker.getSelectionModel(), 'deselect', this.onListDeselect, this);
    
                this.picker.tpl.getItemClass = Ext.Function.bind(function (values) {
                        var record,
                            searchValue,
                            selected;
    
                        if (this.selectionMode === "selection") {
                            return "";
                        }
    
                        Ext.each(this.store.getRange(), function (r) {
                            // do not replace == by ===
                            if (r.get(this.valueField) == values[this.valueField]) {
                                record = r;
                                return false;
                            }
                        }, this);
    
                        selected = record ? this.picker.getSelectionModel().isSelected(record) : false;
    
                        if (selected) {
                            return "x-mcombo-item-checked";
                        }
    
                        return "x-mcombo-item-unchecked";
    
                }, this, [], true);
                
    
                if (this.selectionMode !== "checkbox") {
                    this.picker.on("render", function () {                
                        this.picker.overItemCls = "x-multi-selected";                               
                    }, this);
                }        
    
                this.picker.on("viewready", this.onViewReady, this, {single:true});
            }
            
            return this.picker;
        },
    
        onListSelect : function (model, record) {
            if(!this.ignoreSelection) {
                this.selectRecord(record);
            }
        },
    
        onListDeselect : function (model, record) {
            if(!this.ignoreSelection) {
                this.deselectRecord(record);
            }
        },
    
        reset : function () {
            this.callParent(arguments);
    
            if(this.picker && this.picker.rendered) {
                this.picker.refresh();
            }
        }
    });
  9. #9

    Everything is working fine!

    Everything is working fine! Thank you!

    Excellent support! Daniil, I hope that you have the spirit to continue just as well in the future
  10. #10
    Thank you for the kind words! Enjoy Ext.NET:)
Page 1 of 2 12 LastLast

Similar Threads

  1. [CLOSED] MultiCombo Checkboxes not unchecking
    By FVNoel in forum 2.x Legacy Premium Help
    Replies: 2
    Last Post: May 07, 2013, 12:08 AM
  2. MultiCombo not returning any selected items
    By dtamils in forum 1.x Help
    Replies: 3
    Last Post: Feb 27, 2013, 3:56 AM
  3. How to get the changed items in the MultiCombo.
    By ascsolutions in forum 1.x Help
    Replies: 0
    Last Post: Sep 05, 2012, 3:05 PM
  4. [CLOSED] Multicombo Items
    By FAS in forum 1.x Legacy Premium Help
    Replies: 4
    Last Post: Mar 13, 2012, 7:09 PM
  5. [CLOSED] Multicombo with a lot of items
    By sadaf in forum 1.x Legacy Premium Help
    Replies: 7
    Last Post: Oct 20, 2011, 1:32 PM

Posting Permissions