sql html版ui,JavaScript Query Builder | HTML5 Query Builder | Syncfusion

Overview

The JavaScript Query Builder is a rich and responsive UI for filtering large amounts of data by creating or editing conditions that can be combined with data visualization controls like DataGrid and Charts to view the filtered data. It outputs structured JSON filters that can be easily parsed to create SQL queries. It allows you to create conditions and group them using AND/OR logic.

Data Binding

JavaScript Query Builder can be bound to data from a variety of data sources in the form of a JavaScript object array collection. It auto populates the data source and maps the data to the appropriate fields.

Integration with Data Manager

Integrating the Data Manager control with JavaScript Query Builder simplifies communication with a data source and returns the desired result based on the provided filters.

Templates

Templates are used to create a custom user experience. JavaScript Query Builder provides template support to integrate with other input components such as Dropdown List, AutoComplete , Checkbox, Slider, and others.

Summary View

JavaScript Query Builder supports a summary view that outputs the filter query in SQL format.

Import and export

Import and export Query Builder data to and from structured JSON and SQL formats.

Touch-friendly and Responsive

JavaScript Query Builder provides a responsive mode that gives an adaptive, redesigned UI appearance for mobile devices and a great user experience on all phone, tablet, and desktop form factors.

7cd65ef5318042408768840c971c50d2.png

JavaScript Query Builder Code Example

Easily get started with JavaScript Query Builder using a few simple lines of HTML and TS code, as demonstrated below. Also explore our JavaScript Query Builder Example that shows you how to render and configure the JavaScript Query Builder Component.

import { QueryBuilder, ColumnsModel, RuleModel } from '@syncfusion/ej2-querybuilder';

import { employeeData } from './data-source';

let columnData: ColumnsModel[] = [

{ field: 'EmployeeID', label: 'Employee ID', type: 'number' },

{ field: 'FirstName', label: 'First Name', type: 'string' },

{ field: 'TitleOfCourtesy', label: 'Title Of Courtesy', type: 'boolean', values: ['Mr.', 'Mrs.'] },

{ field: 'Title', label: 'Title', type: 'string' },

{ field: 'HireDate', label: 'Hire Date', type: 'date', format: 'dd/MM/yyyy' },

{ field: 'Country', label: 'Country', type: 'string' },

{ field: 'City', label: 'City', type: 'string' }

];

let importRules: RuleModel = {

'condition': 'and',

'rules': [{

'label': 'EmployeeID',

'field': 'EmployeeID',

'type': 'number',

'operator': 'equal',

'value': 1

},

{

'label': 'Title',

'field': 'Title',

'type': 'string',

'operator': 'equal',

'value': 'Sales Manager'

}]

};

let qryBldrObj: QueryBuilder = new QueryBuilder({

width: '70%',

dataSource: employeeData,

columns: columnData,

rule: importRules

});

qryBldrObj.appendTo('#querybuilder');

Other supported frameworks

The Query Builder component is also available in Blazor, React, Angular, and Vue frameworks. Check out the different Query Builder platforms from the links below,

Web accessibility

Fully supports WAI-ARIA accessibility to work with screen readers and assistive devices.

Follows WAI-ARIA best practices for implementing keyboard interaction.

Follows WCAG 2.0 standards in design of the UI element visuals such as foreground color, background color, line spacing, text, and images.

Supports right-to-left (RTL) text direction for users working in right-to-left languages like Hebrew, Arabic, or Persian.

Themes

The JavaScript Query Builder supports several built-in themes such as material, bootstrap, fabric (office 365), and high contrast. The users can customize any one of these built-in themes or create new themes to achieve their own desired look and feel either by simply overriding SASS variables or using our Theme Studio application with ease.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值