jQWidgets
  • Documentation
  • License and Pricing
  • Services
  • Community
    • Forums
    • Blogs
    • Follow Us
    • Client Login
  • About
    • About Us
    • Contact Us
    • FAQ
  • Demo
  • Download

React UI Components

  • Javascript/jQuery
  • Angular
  • Vue
  • React
  • Custom Elements
  • ASP .NET MVC
  • Showcase Demos
  • Responsive Design
  • Theme Builder
Show Demo List

React UI Components

  • jqxGrid
  • jqxTabs
  • jqxTextArea
  • jqxWindow
  • jqxKnob
  • jqxResponsivePanel
  • jqxChart
  • jqxMenu
  • jqxInput
  • jqxDocking
  • jqxGauge
  • jqxNavBar
  • jqxPivotGrid
  • jqxTree
  • jqxPasswordInput
  • jqxNotification
  • jqxBarGauge
  • jqxSortable
  • jqxScheduler
  • jqxNavigationBar
  • jqxMaskedInput
  • jqxPopOver
  • jqxExpander
  • jqxLoader
  • jqxTreeGrid
  • jqxListMenu
  • jqxComplexInput
  • jqxTooltip
  • jqxRating
  • jqxDraw
  • jqxDataTable
  • jqxToolBar
  • jqxFormattedInput
  • jqxColorPicker
  • jqxRangeSelector
  • jqxDragDrop
  • jqxTreeMap
  • jqxComboBox
  • jqxNumberInput
  • jqxScrollView
  • jqxSlider
  • jqxPanel
  • jqxEditor
  • jqxDropDownList
  • jqxDateTimeInput
  • jqxProgressBar
  • jqxScrollBar
  • jqxValidator
  • jqxRibbon
  • jqxListBox
  • jqxCalendar
  • jqxFileUpload
  • jqxSplitter
  • jqxValidator
  • jqxLayout
  • jqxButtons
  • jqxKanban
  • jqxBulletChart
  • jqxDockingLayout

jqxGrid

  • Default Functionality
  • Spreadsheet
  • Create, Remove, Update
  • Data Export
  • Data Printing
  • State Maintenance
  • Localization
  • DropDown Grid
  • Sorting
    • Sorting
    • Custom Sorting
  • Filtering
    • Filtering
    • Filter Menu Types
    • Custom Filter Menu
    • Filter Row
    • Excel-like Filter
    • Filter Row & Custom List Items
    • Filter Conditions
    • Date & Range Filter
    • Initial Filter
    • Custom List Items with Key/Value
  • Grouping
    • Grouping
    • Grouping with Pager
    • Toggle Sub Rows
    • Aggregates
  • Paging
    • Paging
    • Initial Page and PageSize
    • Pager Modes
  • Editing
    • Editing
    • Popup Editing
    • Edit Modes
    • Customized Editors
    • Disable Editing of Rows
    • Custom DropDownList Column
    • Custom ComboBox Column
    • Cascading ComboBoxes
    • Full Row Edit
    • Row Edit with Ever Present Row
    • Custom Column Editor
    • Custom Row Editor
  • Data Binding
    • Binding to Array
    • Binding to JS Array
    • Binding to Observable Array
    • Binding to XML
    • Binding to JSON
    • Binding to JSON using PHP
    • Binding to JSON String
    • Binding to Remote Data
    • Binding to CSV
    • Binding to TSV
    • Large Data Set
    • Many Columns
    • Refresh Data
    • Virtual Paging
    • Virtual Scrolling
    • Load from Table
  • Aggregates
    • Aggregates
    • Custom Aggregates
    • Aggregates Renderer
    • Grouping Aggregates
  • Columns
    • Text Alignment
    • Show/Hide Columns
    • Auto-Size Columns
    • Percentage Width for Columns
    • CheckBox Column
    • Row Number Column
    • Column Template
    • Widget Column
    • Columns Hierarchy
    • Cells Styling
    • Image Column
    • Columns Resize
    • Columns Reorder
    • Pinned/Frozen Columns
    • Column Tooltips
    • Computed Column
    • Dynamic Columns
    • Foreign Key Column
    • Keys/Values Column
  • Selection
    • Row Selection
    • Cells Selection
    • CheckBox Selection
  • Drag Drop
    • Drag & Drop
  • Ever Present Row
    • Add New Row
    • Add New Bottom Row
    • Updating Actions at Runtime
    • Ever Present Row with Custom Widgets
    • Ever Present Row with Columns
    • Positioning
    • Validation
    • Add, Remove, Update
    • Localized Add New Row
  • Row Details
  • Nested Grids
  • Master Details
  • Deferred Scrolling
  • Deferred Scrolling on a Large Data Set
  • StatusBar
  • ToolBar
  • Context Menu
  • Auto Row Height
  • Custom Keyboard Navigation
  • Fluid Size
  • Grid in jqxTabs
  • Keyboard Navigation
  • Right to Left Layout
Theme:
  • Demo
  • App.htm
  • App.js
This example shows the filtering capabilities of jQWidgets Grid for React JS. Move the mouse cursor over a column header and click the dropdown button to open the filtering menu. You can filter empty rows, rows containing or matching certain string, or rows starting or ending with a certain string. You can add successive filters with 'And' and 'Or'. There are also built-in filtering menus where you can directly select or deselect items. In addition you can add custom filtering menus. jQWidgets Grid for Reactjs also enables Excel-like filtering. You can also customize the filtering conditions available in the columns popup menu. Date and range filters can be implemented with calendar components.
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title id='Description'>
        This example illustrates the React Grid filtering feature. Move the mouse cursor over a column header and click the dropdown button to open the filtering menu.
    </title>
	<meta name="description" content="This React Grid demo showcases how to use React Grid data filtering"/>
	
    <link rel="stylesheet" href="../jqwidgets/styles/jqx.base.css" type="text/css" />
    <script type="text/javascript" src="../jqwidgets/jqxcore.js"></script>
    <script type="text/javascript" src="../jqwidgets/jqxdata.js"></script>
    <script type="text/javascript" src="../jqwidgets/jqxbuttons.js"></script>
    <script type="text/javascript" src="../jqwidgets/jqxscrollbar.js"></script>
    <script type="text/javascript" src="../jqwidgets/jqxcalendar.js"></script>
    <script type="text/javascript" src="../jqwidgets/jqxdatetimeinput.js"></script>
    <script type="text/javascript" src="../jqwidgets/jqxpanel.js"></script>
    <script type="text/javascript" src="../jqwidgets/jqxmenu.js"></script>
    <script type="text/javascript" src="../jqwidgets/jqxcheckbox.js"></script>
    <script type="text/javascript" src="../jqwidgets/jqxlistbox.js"></script>
    <script type="text/javascript" src="../jqwidgets/jqxdropdownlist.js"></script>
    <script type="text/javascript" src="../jqwidgets/jqxgrid.js"></script>
    <script type="text/javascript" src="../jqwidgets/jqxgrid.sort.js"></script>
    <script type="text/javascript" src="../jqwidgets/jqxgrid.filter.js"></script>
    <script type="text/javascript" src="../jqwidgets/jqxgrid.pager.js"></script>
    <script type="text/javascript" src="../jqwidgets/jqxgrid.selection.js"></script>
    <script type="text/javascript" src="../jqwidgets/jqxgrid.edit.js"></script>
    <script type="text/javascript" src="../jqwidgets/globalization/globalize.js"></script>
    <script type="text/javascript" src="../sampledata/generatedata.js"></script>
    <script type="text/javascript" src="../scripts/demos.js"></script>
</head>
<body>
    <div class="example-description" style="margin-bottom:3em">
        This example illustrates the React Grid filtering feature. Move the mouse cursor over a column header and click the dropdown button to open the filtering menu.
    </div>
    <div id="app"></div>
    <script src="../build/grid_filtering.bundle.js"></script>
</body>
</html>

import React from 'react';import ReactDOM from 'react-dom';import JqxGrid from '../../../jqwidgets-react/react_jqxgrid.js';import JqxButton from '../../../jqwidgets-react/react_jqxbuttons.js';import JqxCheckBox from '../../../jqwidgets-react/react_jqxcheckbox.js';import JqxPanel from '../../../jqwidgets-react/react_jqxpanel.js';class App extends React.Component {
    componentDidMount() {
        this.refs.Grid.on('filter', (event) => {
            this.refs.Panel.clearcontent();
            let filterinfo = this.refs.Grid.getfilterinformation();
            let eventData = 'Triggered "filter" event';
            for (i = 0; i < filterinfo.length; i++) {
                let eventData = 'Filter Column: ' + filterinfo[i].filtercolumntext;
                this.refs.Panel.prepend('<div style="margin- top: 5px;">' + eventData + '</div>');
            }
        });
        this.refs.Button.on('click', () => {
            this.refs.Grid.clearfilters();
        });
        // show/hide filter background
        this.refs.CheckBox1.on('change', (event) => {
            this.refs.Grid.showfiltercolumnbackground(event.args.checked);
        });
        // show/hide filter icons
        this.refs.CheckBox2.on('change', (event) => {
            this.refs.Grid.autoshowfiltericon(!event.args.checked);
        });
        this.addFilter()
    }
    addFilter() {
        let filtergroup = new $.jqx.filter();
        let filter_or_operator = 1;
        let filtervalue = 'Beate';
        let filtercondition = 'contains';
        let filter1 = filtergroup.createfilter('stringfilter', filtervalue, filtercondition);
        filtervalue = 'Andrew';
        filtercondition = 'starts_with';
        let filter2 = filtergroup.createfilter('stringfilter', filtervalue, filtercondition);

        filtergroup.addfilter(filter_or_operator, filter1);
        filtergroup.addfilter(filter_or_operator, filter2);
        // add the filters.
        this.refs.Grid.addfilter('firstname', filtergroup);
        // apply the filters.
        this.refs.Grid.applyfilters();
    }
    render() {
        let data = generatedata(500);
        let source =
            {
                localdata: data,
                datafields:
                [
                    { name: 'firstname', type: 'string' },
                    { name: 'lastname', type: 'string' },
                    { name: 'productname', type: 'string' },
                    { name: 'date', type: 'date' },
                    { name: 'quantity', type: 'number' },
                    { name: 'price', type: 'number' }
                ],
                datatype: 'array'
            };
        let dataAdapter = new $.jqx.dataAdapter(source);

        let columns =
            [
                { text: 'First Name', datafield: 'firstname', width: 160 },
                { text: 'Last Name', datafield: 'lastname', width: 160 },
                { text: 'Product', datafield: 'productname', width: 170 },
                { text: 'Order Date', datafield: 'date', filtertype: 'date', width: 160, cellsformat: 'dd-MMMM-yyyy' },
                { text: 'Quantity', datafield: 'quantity', width: 80, cellsalign: 'right' },
                { text: 'Unit Price', datafield: 'price', cellsalign: 'right', cellsformat: 'c2' }
            ];
        return (
            <div id='jqxWidget' style={{ fontSize: 13, fontFamily: 'Verdana', float: 'left' }}>
                <JqxGrid ref='Grid'
                    width={850} source={dataAdapter} filterable={true}
                    sortable={true} autoshowfiltericon={true} columns={columns}
                />
                <div id='eventslog' style={{ marginTop: 30 }}>
                    <div style={{ width: 200, float: 'left', marginRight: 10 }}>
                        <JqxButton ref='Button' height={25} value='Remove Filter' />
                        <JqxCheckBox ref='CheckBox1' checked={true} height={25} style={{ marginTop: 10 }} value='Filter Background' />
                        <JqxCheckBox ref='CheckBox2' checked={false} height={25} style={{ marginTop: 10 }} value='Show All Filter Icons' />
                    </div>
                    <div style={{ float: 'left' }}>
                        Event Log:
            <JqxPanel ref='Panel' width={300} height={80} style={{ border: 'none' }} />
                    </div>
                </div>
            </div>
        )
    }
}

ReactDOM.render(<App />, document.getElementById('app'));

jQWidgets
  • Facebook
  • Youtube
  • Google +
  • Demo
  • Download
  • Documentation
  • License and Pricing
  • Services
  • Forums
  • About
  • Terms of Use
  • Privacy Policy
  • Contact Us

jQWidgets © 2011-2019. All Rights Reserved.