Name | Type | Default | Description |
AllowDrag | bool | false | Enables the dragging of conditions inside a group or between groups. |
ApplyMode | QueryBuilderApplyMode | QueryBuilderApplyMode.Change | Determines when the value of the element is updated with the new changes. |
AutoPrompt | bool | false | Determines whether QueryBuilder will automatically prompt the user to enter a condition value when a new condition is created. When 'applyMode' is set to 'immediately', the operation field is automatically populated if empty when the selected condition operator is changed. The input field prompts the user when the operation or operator of the condition is changed. |
CustomOperations | IEnumerable<IQueryBuilderCustomOperation> | N/A | Adds more operations that can be used to the query bilder's conditions structure. Each custom operation can have the following fields: |
Disabled | bool | false | Enables or disables the element. |
DropDownWidth | string | "100%" | Sets or gets the dropdown width of the property and operator editors. |
Fields | IEnumerable<IQueryBuilderField> | N/A | Array with filter fields and their settings. The available field settings are:- label - the field's label, as it will appear in the field selection drop down
- dataField - the field's data field
- dataType - the field's data type
- filterOperations - an array of the filter operations applicable to the field; if not set, the default filter operations are applied
- lookup - an object with settings for customizing the field's respective value selection input. It has the following settings:
- autoCompleteDelay - delay between typing in the input and opening the drop down with available options
- dataSource - an array of available options to choose from (appear in a drop down)
- minLength - minimum number of charactes to type in the input before the options drop down is displayed
- readonly - if set to true, the value selection input acts as a drop down list, otherwise it acts as a combo box
|
FieldsMode | QueryBuilderFieldsMode | QueryBuilderFieldsMode.Dynamic | Determines whether new fields can be dynamically added by typing in the field (property) box. |
FormatStringDate | string | "dd-MMM-yy" | Sets or gets the format string of the editor of fields with type 'date'. |
FormatStringDateTime | string | "dd-MMM-yy HH:mm:ss" | Sets or gets the format string of the editor of fields with type 'dateTime'. |
GetDynamicField | object | N/A | A callback function called when a field is added dynamically. Used for configuring settings of the new field. Applicable only when fieldsMode is 'dynamic'. |
Icons | object | { '=': 'equals', '<>': 'notequals', '>': 'greaterthan', '>=': 'greaterthanorequal', '<': 'lessthan', '<=': 'lessthanorequal', 'startswith': 'startswith', 'endswith': 'endswith', 'contains': 'contains', 'notcontains': 'notcontains', 'isblank': 'isblank', 'isnotblank': 'isnotblank' } | Defines CSS classes to be applied to each of the built-in operations. Icons for these classes are applied in the Smart-query-builder style sheet. This property is applicable only if showIcons is set to true. |
Locale | string | "en" | Sets or gets the language. Used in conjunction with the property messages. |
Messages | object | N/A | Defines field names of the filtered element. |
OperatorPlaceholder | string | "Operator" | Determines the placeholder text used inside the condition's operator box in case an operator is not selected. |
PropertyPlaceholder | string | "Property" | Determines the placeholder text used inside the condition's field (property) box in case a field is not selected. |
RightToLeft | bool | false | Sets or gets the value indicating whether the element is aligned to support locales using right-to-left fonts. |
ShowIcons | bool | false | Shows/Hides the operator icons shown in the operator selection drop down. |
ShowFieldNameArrow | bool | false | Shows/Hides the drop down icon for the operator field name of the conditions. |
Theme | string | "" | Determines the theme. Theme defines the look of the element |
Unfocusable | bool | false | If is set to true, the element cannot be focused. |
ValidateOnInput | bool | false | Determines whether the value of the condition is validated on key up or not. By default the value is validated when the user blur's the value input. The validationTimeout determines the time interval after the user has ended typing that triggers the value validation. |
ValidationTimeout | int | 100 | Determines the timeout (starting after the user has finished typing in the value field) before the validation is applied to the condition value. This property works along validationOnInput. |
Value | object | N/A | The value is represented by multidimensional array. The array contains group operators with conditions. Each group can contain multiple conditions. |
ValueFormatFunction | object | N/A | Callback used to format the content of the condition value fields. |
ValuePlaceholder | string | "Value" | Determines the placeholder text used inside the condition's value box in case a value is not set. |
Name | Type | Description | Event Detail |
OnChange | EventCallback<Event> | This event is triggered when the query builder's value is changed. | dynamic item- The item that is being dragged., dynamic data- The data of the item that is being dragged., dynamic originalEvent- The original event. |
Changed | event QueryBuilderChangedEventHandler | This event is triggered when the query builder's value is changed. | QueryBuilderChangedEventArgs |
OnDragEnd | EventCallback<Event> | This event is triggered when a dragged condition is dropped. This action can be canceled by calling event.preventDefault() in the event handler function. | dynamic item- The item that is being dragged., dynamic data- The data of the item that is being dragged., dynamic target- The target item., dynamic targetData- the data of the target item., string targetSide- The side of the target item where the dragged item will be dropped. |
DragEnded | event QueryBuilderDragEndedEventHandler | This event is triggered when a dragged condition is dropped. This action can be canceled by calling event.preventDefault() in the event handler function. | QueryBuilderDragEndedEventArgs |
OnDragging | EventCallback<Event> | This event is triggered when a condition is being dragged. | dynamic item- The item that is being dragged., dynamic data- The data of the item that is being dragged., dynamic originalEvent- The original event. |
Dragging | event QueryBuilderDraggingEventHandler | This event is triggered when a condition is being dragged. | QueryBuilderDraggingEventArgs |
OnDragStart | EventCallback<Event> | This event is triggered when a dragging operation is started in jqx-query-builder. This action can be canceled by calling event.preventDefault() in the event handler function. | dynamic item- The item is going to be dragged., dynamic data- The data of the item that is going to be dragged., dynamic originalEvent- The original event. |
DragStarted | event QueryBuilderDragStartedEventHandler | This event is triggered when a dragging operation is started in jqx-query-builder. This action can be canceled by calling event.preventDefault() in the event handler function. | QueryBuilderDragStartedEventArgs |
OnItemClick | EventCallback<Event> | This event is triggered when one of the query builder's building blocks ( oeprator, fieldName, value, close button, etc) is clicked. | string id- The internal id of the clicked item, e.g. '0.1', '1.1', etc., dynamic type- The type of the clicked item ( condition or a group )., dynamic data- The data of the item. |
ItemClicked | event QueryBuilderItemClickedEventHandler | This event is triggered when one of the query builder's building blocks ( oeprator, fieldName, value, close button, etc) is clicked. | QueryBuilderItemClickedEventArgs |
OnPropertySelected | EventCallback<Event> | This event is triggered when a field has been selected. | string label- The label of the selected property., dynamic value- The value of the selected property. |
PropertySelected | event QueryBuilderPropertySelectedEventHandler | This event is triggered when a field has been selected. | QueryBuilderPropertySelectedEventArgs |
Name | Type | Default | Description |
Label | string | "" | label to be displayed in the operator box. Multiple operations with the same label can exist |
Name | string | "" | A unique name for the operation. |
EditorTemplate | object | null | A callback function that creates a custom value editor. Takes three arguemnts: - fieldType - the type of the field for the operation.
- value - the value of the condition.
- fieldData - the field object.
|
ValueTemplate | object | null | A callback function that displays the value after the edior has been closed. Takes two argument: - editor - the custom editor element
- value - the condition value.
|
HandleValue | object | null | A callback function that handles the value returned by the editor when it is closed. The callback takes one arguemnt - the custom editor element. If the dataType is 'object' the expected result from the function should contain a 'label' and 'value' attributes. Where the label will be used for displaying purposes while 'value' will be used as the actual value. |
HideValue | bool | false | A boolean condition that specifies whether the operation requires a value or not. |
ValidateValue | object | null | A callback that is executed when QueryBuilder validation is triggered. The callback takes one argument, the value of the condition. The function should return true or false to determine whether the conditon is valid or not. |
OnEditorOpen | object | null | A callback that is called when the custom editor is rendered, visible inside the DOM and ready to be opened. The callback has one parameter - the custom editor element. |
ExpressionTemplate | string | "" | A string representing a custom Linq expression template. If the value of the element is a string it will be considered as a Linq expression and it will be checked against all expressionTemplates to find a match. |
ExpressionReaderCallback | object | null | A callback that is used to specify which arguments from the expression are used for the fieldName and value. Used when converting a Linq expression to QueryBuilder value. Takes two arguments: - expression - the LinQ expression defined in the expressionTemplate of the customOperator. Type string
- bindings - an array of expression parameters based on the expression template of the customOperator. Type string[]
|
ExpressionBuilderCallback | object | null | A callback function that is used to specify which arguments from the Linq expression are used for the fieldName and value when building the Linq expression from the current value of the element. Takes three arguments: - name - the name of the dataField. Type string.
- operation - the name of the operation. Type string
- value - the value of the operation. Type any( depends on the dataField).
|