This widget represents “query panel” - a rectangular area of your web-page which contains hierarchical list of query conditions
and provides some operations for manipulating with that list: add a new condition or condition group, remove an existing condition, enable/disable conditions, etc.
All options of QueryPanel widgets can be set through queryPanel
property of easyQuerySettings
global variable.
Of course you can also set options and call methods of QueryPanel in an usual for jQuery widgets way.
Options
showRootRow
Type:Boolean
Default:true
Gets or sets a value indicating whether query panel must show a root row which represents the main group of conditions
showAddRow
Type:Boolean
Default:true
Gets or sets a value indicating whether query panel must show a special [add condition] link at the bottom
showCheckboxes
Type:Boolean
Default:false
Gets or sets a value indicating whether query panel must show a checkbox at the beginning of each condition row.
User will be able to use these checkboxes to enable/disable corresponding query conditions
showPoweredBy
Type:Boolean
Default:true
Allows to turn off “Powered by EasyQuery” link shown in the bottom right cornder of query panel. Works only in the full version of the script.
Type:Boolean
Default:false
If true QueryPanel widget will always show button in predicate (group) rows.
Instead of default behaviour when they are shown only on mouse over.
Type:Boolean
Default:false
If true QueryPanel widget will always show button in condition rows.
Instead of default behaviour when they are shown only on mouse over.
showConjunctions
Type:Boolean
Default:true
If true QueryPanel widget will show conjunction elements (“and” or “or”) at the beginning of each condition.
accentActiveCondition
Type:Boolean
Default:true
If true the active condition (the one user clicked on previously) will have accent background color.
activateRootOnStart
Type:Boolean
Default:true
If true root predicate row become active at the beginning.
Type:String
Default:d MM, yy
Type:String
Default:{entity} {attr}
The format of entity attributes used in query panel conditions.
You can set it to '{attr}' to shown only attribute part (without entity name)
Type:Object
Contains different options for popup menu that appears for selecting attributes, operators or values in condition.
Includes the following sub-options:
showSearchBoxAfter
Type:integer
Default:30
If the number of items in drop down menu exceeds this number then a search box will be displayed.
Set this option to 0 if want to show the search box in any case
activateOnMouseOver
Type:boolean
Default:true
If true - the row in query panel will be highlighted when user moves mouse cursor over it.
subQueryDialogWidth
Type:Integer
Default:600
Sets or gets the width of sub-query dialog
subQueryDialogHeight
Type:Integer
Default:300
Sets or gets the height of sub-query dialog
dialogZIndex
Type:Integer
Default:100000
Sets or gets the ZIndex property of the different dialogs used in QueryPanel (including the sub-query dialog)
numberDecimalSeparatorDisplay
Type:String
Default:.
Sets or gets the symbol which is used as decimal separator
numberListSeparators
Type:List
Default:[',', ';']
Sets or gets the symbols which are recognized as list items separators
(for example when user is supposed to enter a list of values in a text box).
autoEditNewCondition
Type:Boolean
Default:false
If true the QueryPanel will automaticall show value editor for any new (just added) condition.
Methods
clearConditions
Clears the list of conditions in associated query and redraws a panel if needed
Code examples:
var QueryPanelDiv = $("#QueryPanel");
QueryPanelDiv.QueryPanel('clearConditions');
clearQuery
Clears all parts (list of conditions, list of columns) in associated query and redraws a panel if needed
Code examples:
var QueryPanelDiv = $("#QueryPanel");
QueryPanelDiv.QueryPanel('clearQuery');
editConditionValue
Turns the row for condition passed in parameter into “edit” mode.
If no parameter is passed then it switch on edit mode for current active row.
Code examples:
var QueryPanelDiv = $("#QueryPanel");
QueryPanelDiv.QueryPanel('editConditionValue');
addNewCondition
Creates a new simple condition with attribute and operator based on their IDs passed in parameters
and then adds this new condition into the root predicate.
Parameters:
attrid
Type:String
Attribute ID. By default attribute ID is equals to TableName.FieldName of corresponding column.
operid
Type:String
Operator ID (e.g. 'Equals', 'StartsWith', etc).
Code examples:
var QueryPanelDiv = $("#QueryPanel");
QueryPanelDiv.QueryPanel('addNewCondition', 'Orders.Paid', 'IsTrue');
Activates the particular condition in the panel
Parameters:
conditionWidget
Type:Object
The ConditionRow_SMPL or ConditionRow_PDCT object to activate.
Discussion
By default all EasyQuery widgets are connected to default Query object created automatically during initialization (the one you can get using EQ.client.getQuery() function).
To place second QueryPanel on your page you will need to create one more Query object "manually" and connect it with that QueryPanel.
May I ask why you need to QueryPanel object on your page?
However, you still didn't describe why you need to build 2 queries (filters) on one page.
https://almsaeedstudio.com/themes/AdminLTE/index2.html