Table of Contents

QueryPanel widget

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 one, enable/disable conditions, etc.

Options

listRequestHandler

Type:Function
Default:null
Sets a callback function which returns lists for “CustomList” value editors

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.

alwaysShowButtonsInPredicates

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.

alwaysShowButtonsInConditions

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.

dateFormatValue

Type:String
Default:mm/dd/yy
A string that represents the format of date values used in date/time picker widget.

dateFormatDisplay

Type:String
Default:d MM, yy
The format of date values used in condition rows.

attrElementFormat

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)

Methods

clearConditions

Clears the list of conditions in associated query and redraws a panel if needed Example:

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 Example:

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. Example:

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.
attrid
Type:String

Attribute ID

operid
Type:String

Operator ID (e.g. 'Equals', 'StartsWith', etc).

Example:

var QueryPanelDiv = $("#QueryPanel");
QueryPanelDiv.QueryPanel('editConditionValue');