[OPEN] [#320] RegEx Case sensitive

  1. #1

    [OPEN] [#320] RegEx Case sensitive

    option performs the searches but has encuenta the uppercase and lowercase to do this, it is required that would seek case-insensitiveClick image for larger version. 

Name:	IMG1.png 
Views:	16 
Size:	23.0 KB 
ID:	6673Click image for larger version. 

Name:	IMG2.png 
Views:	13 
Size:	11.5 KB 
ID:	6674
    <ext:ComboBox ID="LstManUsuSol" runat="server" FieldLabel="Usuario Solicita" EmptyText="Seleccione..."
                    Mode="Local" ForceSelection="true" AllowBlank="false" EnableRegEx="true" QueryMode="Local"
                    StoreID="StrListUsuariosCFWeb" DisplayField="NOMBRE" ValueField="OID" AnchorHorizontal="95%" MinChars="1">
                </ext:ComboBox>
    Last edited by Daniil; Aug 08, 2013 at 6:04 AM. Reason: [OPEN] [#320]
  2. #2
    Hi @farallones,

    Here is an open ticket for that.
    http://www.sencha.com/forum/showthread.php?268447

    Here is a full override with a possible solution.
    http://www.sencha.com/forum/showthre...l=1#post983345
  3. #3
    Quote Originally Posted by Daniil View Post
    Hi @farallones,

    Here is an open ticket for that.
    http://www.sencha.com/forum/showthread.php?268447

    Here is a full override with a possible solution.
    http://www.sencha.com/forum/showthre...l=1#post983345

    not indicate which is the solution, just that it's a bug, when you will have solution or should be adjusted to perform the search field in the upper or regardless of the lowercase
  4. #4
    Hello!

    Sorry, did this overriding help you:

    Ext.form.field.ComboBox.override({
    	doQuery: function(queryString, forceAll, rawQuery) {
    		queryString = queryString || '';
    
    
    		// store in object and pass by reference in 'beforequery'
    		// so that client code can modify values.
    		var me = this,
    			qe = {
    				query: queryString,
    				forceAll: forceAll,
    				combo: me,
    				cancel: false
    			},
    			store = me.store,
    			isLocalMode = me.queryMode === 'local';
    
    
    		if (me.fireEvent('beforequery', qe) === false || qe.cancel) {
    			return false;
    		}
    
    
    		// get back out possibly modified values
    		queryString = qe.query;
    		forceAll = qe.forceAll;
    
    
    		// query permitted to run
    		if (forceAll || (queryString.length >= me.minChars)) {
    			// expand before starting query so LoadMask can position itself correctly
    			me.expand();
    
    
    			// make sure they aren't querying the same thing
    			if (!me.queryCaching || me.lastQuery !== queryString) {
    				me.lastQuery = queryString;
    
    
    				if (isLocalMode) {
    
    
    					// Querying by a typed string...
    					if (queryString || !forceAll) {
    
    
    						// Ensure queryFilter is enabled and set the new value
    						me.queryFilter.disabled = false;
    						me.queryFilter.setValue(me.enableRegEx ? new RegExp(queryString, me.caseSensitive ? '' : 'i') : queryString);
    					}
    
    
    					// Disable query value filter if no query string or forceAll passed
    					else {
    						me.queryFilter.disabled = true;
    					}
    
    
    					// Filter the Store according to the updated filter
    					store.filter();
    				} else {
    					// Set flag for onLoad handling to know how the Store was loaded
    					me.rawQuery = rawQuery;
    
    
    					// In queryMode: 'remote', we assume Store filters are added by the developer as remote filters,
    					// and these are automatically passed as params with every load call, so we do *not* call clearFilter.
    					if (me.pageSize) {
    						// if we're paging, we've changed the query so start at page 1.
    						me.loadPage(1);
    					} else {
    						store.load({
    							params: me.getParams(queryString)
    						});
    					}
    				}
    			}
    
    
    			// Clear current selection if it does not match the current value in the field
    			if (me.getRawValue() !== me.getDisplayValue()) {
    				me.ignoreSelection++;
    				me.picker.getSelectionModel().deselectAll();
    				me.ignoreSelection--;
    			}
    
    
    			if (isLocalMode) {
    				me.doAutoSelect();
    			}
    			if (me.typeAhead) {
    				me.doTypeAhead();
    			}
    		}
    		return true;
    	}
    });
  5. #5
    Created an Issue to track the defect.
    https://github.com/extnet/Ext.NET/issues/320

Similar Threads

  1. [CLOSED] Resourcemanager.Locale is case sensitive
    By betamax in forum 1.x Legacy Premium Help
    Replies: 3
    Last Post: Sep 13, 2012, 12:38 PM
  2. [CLOSED] Need ability to search combobox items by lower case or upper case
    By wisdomchuck in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Jul 23, 2012, 1:40 PM
  3. How can i do set TextField only lower case
    By fatihunal in forum 1.x Help
    Replies: 2
    Last Post: Feb 28, 2012, 10:55 PM
  4. [CLOSED] Data selection case sensitive on Store with row selection issue
    By ljcorreia in forum 1.x Legacy Premium Help
    Replies: 7
    Last Post: Oct 20, 2010, 2:30 PM
  5. grid sorting case sensitive?
    By [WP]joju in forum 1.x Help
    Replies: 2
    Last Post: Sep 22, 2009, 6:15 AM

Posting Permissions