Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7077689
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T06:27:17+00:00 2026-05-28T06:27:17+00:00

I have the following code working with a DataGrid that has two column Column_A

  • 0

I have the following code working with a DataGrid that has two column Column_A and Column_B respectively:

grid.filter({Column_A: '*test*', Column_B: '*'}, true)

This code works fine and finds all rows where Column_A has the word test in it… now, I’d like to do the same but look in either column…. the comma translates to an AND operation but I am looking for an OR operation.

I read the AndOrReadStore specs and based on my understanding I should be able to do something like this:

grid.filter({complexQuery: "Column_A: '*test*' OR Column_B: '*'"}, true)

however this does not work and I don’t get any results… I can’t even get it to work with one column, like this

grid.filter({complexQuery: "Column_A: '*test*'"}, true)

What am I doing wrong?

Thank you

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T06:27:17+00:00Added an answer on May 28, 2026 at 6:27 am

    Here is a working programmatic example (Click the button to invoke the filter: Column_A contains an e OR Column_B is 300):

    the JavaScript (script.js):

    dojo.require("dijit.layout.ContentPane");
    dojo.require("dijit.form.Button");
    dojo.require("dojox.grid.DataGrid");
    dojo.require('dojox.data.AndOrReadStore');
    
    dojo.ready(function(){  
    var appLayout = new dijit.layout.ContentPane({
        id: "appLayout"
    }, "appLayout");
    
    var data = {
      'items': [
        {'Column_A': 'alpha', 'Column_B': '100'},
        {'Column_A': 'beta',  'Column_B': '200'},
        {'Column_A': 'gamma', 'Column_B': '300'},
        {'Column_A': 'delta', 'Column_B': '400'}
      ]
    };
    var store = new dojox.data.AndOrReadStore({
        data: data      
    });
    
    
    var layout = [[ 
      {name : 'A', field : 'Column_A', width : '125px'},
      {name : 'B', field : 'Column_B', width : '100%'} 
    ]];
    
    
    var grid = new dojox.grid.DataGrid({
        structure : layout,
        store: store,
        queryOptions: {ignoreCase: true}
    });
    
    
        var filterButton = new dijit.form.Button({
            label: "Filter",
            onClick: function () {
                grid.filter({complexQuery: "Column_A: '*e*' OR 'Column_B: '300'"});
            }
        });
    
        filterButton.placeAt(appLayout.domNode);
        grid.placeAt(appLayout.domNode);
    
        appLayout.startup();
    });
    

    And now the html (index.html)

    <html lang="en">
      <head>
        <meta charset="utf-8">
        <title>DataGrid with AndOrReadStore</title>
    
        <link rel="stylesheet" href="style.css" media="screen"/>   
        <link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/dojo/1.7.1/dijit/themes/claro/claro.css" />
        <link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/dojo/1.7.1/dijit/themes/claro/document.css" />   
        <link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/dojo/1.7.1/dojox/layout/resources/ExpandoPane.css" />
        <link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/dojo/1.7.1/dojox/grid/resources/claroGrid.css">
        <link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/dojo/1.7.1/dojox/grid/enhanced/resources/claro/EnhancedGrid.css">
    
        <script src="http://ajax.googleapis.com/ajax/libs/dojo/1.7.1/dojo/dojo.js" type="text/javascript"></script>
        <script src="script.js" type="text/javascript"></script>
      </head>
    
      <body class="claro">
        <div id="appLayout"></div>
      </body>
    </html>
    

    And finally the css (style.css)

    html, body {
      width: 100%; height: 100%;
      margin: 0; padding: 0; 
      overflow: hidden;     
    }   
    
    #appLayout {
      width: 100%; height: 100%;
    } 
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following code working fine but the problem is that it always
I have the following code that applies a XSLT style Test.Xml.xslTransform = function(xml, xsl)
i have the following code which stopped working recently. The problem is that no
I have the following code in the header of a website that I'm working
I have the following working code: http://jsfiddle.net/NtHwN/4/ It will deduct the number that is
On a Solaris 5.8 machine, I have the following code: [non-working code] char *buf;
I have the following code and it's working (as usual) in everything but IE.
Im trying to get debugging working without an app.config. I have the following code:
I have the following Clojure code and I'm not sure why it's not working:
Any idea why the following code is not working mysql credentials are correct, have

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.