-- Learning not just technology, but dreams!
Home HTML JAVASCRIPT CSS VUE REACT PYTHON3 JAVA C C++ C# AI GO SQL LINUX VS CODE BOOTSTRAP GIT Local Bookmarks
jQuery EasyUI Tutorial
jQuery EasyUI Tutorial
jQuery EasyUI Introduction
jEasyUI Applications
jEasyUI Create CRUD Application
jEasyUI Create CRUD DataGrid
jEasyUI Form CRUD Application
jEasyUI Create RSS Reader
jEasyUI Drag and Drop
jEasyUI Basic Drag and Drop
jEasyUI Create Drag and Drop Shopping Cart
jEasyUI Create School Timetable
jEasyUI Menu and Button
jEasyUI Create Simple Menu
jEasyUI Create Link Button
jEasyUI Create Menu Button
jEasyUI Create Split Button
jEasyUI Layout
jEasyUI Create Border Layout
jEasyUI Create Complex Layout
jEasyUI Create Accordion
jEasyUI Create Tabs
jEasyUI Dynamically Add Tabs
jEasyUI Add Auto-play Tabs
jEasyUI Create XP-style Left Panel
jEasyUI DataGrid
jEasyUI Convert HTML Table to DataGrid
jEasyUI Get Selected Row Data
jEasyUI Add Search Functionality
jEasyUI Add Toolbar
jEasyUI Create Complex Toolbar
jEasyUI Set Frozen Columns
jEasyUI Dynamically Change Columns
jEasyUI Format Columns
jEasyUI Set Sorting
jEasyUI Custom Sorting
jEasyUI Create Column Groups
jEasyUI Add Checkbox
jEasyUI Custom Pagination
jEasyUI Enable Row Editing
jEasyUI Extend Editor
jEasyUI Column Calculation
jEasyUI Merge Cells
jEasyUI Create Custom View
jEasyUI Create Footer Summary
jEasyUI Conditionally Set Row Background Color
jEasyUI Create PropertyGrid
jEasyUI Expand Row to Show Details
jEasyUI Create SubGrid
jEasyUI Display Massive Data
jEasyUI Add Pagination Component
jEasyUI Window
jEasyUI Create Simple Window
jEasyUI Custom Window Toolbar
jEasyUI Window and Layout
jEasyUI Create Dialog
jEasyUI Custom Dialog
jEasyUI Tree Menu
jEasyUI Create Tree Menu with Markup
jEasyUI Create Async Tree Menu
jEasyUI Add Nodes to Tree Menu
jEasyUI Create Tree Menu with Checkbox
jEasyUI Tree Menu Drag and Drop Control
jEasyUI Tree Menu Load Parent/Child Nodes
jEasyUI Create Basic TreeGrid
jEasyUI Create Complex TreeGrid
jEasyUI TreeGrid Dynamic Loading
jEasyUI TreeGrid Add Pagination
jEasyUI TreeGrid Lazy Load Nodes
jEasyUI Form
jEasyUI Create Async Submit Form
jEasyUI Form Validation
jEasyUI Create Tree ComboBox
jEasyUI Format ComboBox
jEasyUI Filter ComboBox DataGrid
jEasyUI Reference Manual
jQuery EasyUI Plugins
jQuery EasyUI Extensions
jQuery EasyUI DataGrid – Get Selected Row Data
jQuery EasyUI DataGrid – Add Toolbar
Deep Dive
Software
Programming
Technical Reference Information
Software Utilities
Data Management
Programming Languages
Computer Science
Web Design and Development
Web Service
Scripting Languages
jQuery EasyUI DataGrid - Adding Search Functionality
This example demonstrates how to retrieve data from a database and display it in a data grid (datagrid). It then shows how to search and display results based on user input keywords.
Create DataGrid
Create a data grid (datagrid) with pagination functionality, and then add a toolbar to it.
| Item ID |
Product ID |
List Price |
Unit Cost |
Attribute |
Stauts |
The toolbar is defined as follows:
When the user enters query values and clicks the search button, the 'doSearch' function will be called:
function doSearch(){
$('#tt').datagrid('load',{
itemid: $('#itemid').val(),
productid: $('#productid').val()
});
}
The code above calls the 'load' method to load new data grid (datagrid) data. We need to pass the 'itemid' and 'productid' parameters to the server.
Server-side code
include 'conn.php';
$page = isset($_POST['page']) ? intval($_POST['page']) : 1;
$rows = isset($_POST['rows']) ? intval($_POST['rows']) : 10;
$itemid = isset($_POST['itemid']) ? mysql_real_escape_string($_POST['itemid']) : '';
$productid = isset($_POST['productid']) ? mysql_real_escape_string($_POST['productid']) : '';
$offset = ($page-1)*$rows;
$result = array();
$where = "itemid like '$itemid%' and productid like '$productid%'";
$rs = mysql_query("select count(*) from item where " . $where);
$row = mysql_fetch_row($rs);
$result = $row;
$rs = mysql_query("select * from item where " . $where . " limit $offset,$rows");
$items = array();
while($row = mysql_fetch_object($rs)){
array_push($items, $row);
}
$result = $items;
echo json_encode($result);
Download jQuery EasyUI Example
jeasyui-datagrid-datagrid24.zip
jQuery EasyUI DataGrid – Get Selected Row Data
jQuery EasyUI DataGrid – Add Toolbar
ByteArk Coding Plan
Supports mainstream large models like Doubao, GLM, DeepSeek, Kimi, MiniMax, officially supplied, stable and reliable.
Configuration Guide
¥9.9
/ Month
Activate Now
iFlytek Stardust Coding Plan
Includes free model call quota, DeepSeek, GLM, Kimi, MiniMax, one-stop experience and deployment platform.
Configuration Guide
¥3.9
/ Month
Activate Now
Click here to share notes
Category Navigation
Python / Data Science
AI / Intelligent Development
Front-end Development
Back-end Development
Database
Mobile Development
DevOps / Engineering
Programming Languages
Computer Fundamentals
XML / Web Service
.NET
Website Building
Advertisement
jQuery EasyUI Tutorial
jQuery EasyUI Tutorial
jQuery EasyUI Introduction
jEasyUI Applications
jEasyUI Create CRUD Application
jEasyUI Create CRUD DataGrid
jEasyUI Form CRUD Application
jEasyUI Create RSS Reader
jEasyUI Drag and Drop
jEasyUI Basic Drag and Drop
jEasyUI Create Drag and Drop Shopping Cart
jEasyUI Create School Timetable
jEasyUI Menu and Button
jEasyUI Create Simple Menu
jEasyUI Create Link Button
jEasyUI Create Menu Button
jEasyUI Create Split Button
jEasyUI Layout
jEasyUI Create Border Layout
jEasyUI Create Complex Layout
jEasyUI Create Accordion
jEasyUI Create Tabs
jEasyUI Dynamically Add Tabs
jEasyUI Add Auto-play Tabs
jEasyUI Create XP-style Left Panel
jEasyUI DataGrid
jEasyUI Convert HTML Table to DataGrid
jEasyUI Get Selected Row Data
jEasyUI Add Search Functionality
jEasyUI Add Toolbar
jEasyUI Create Complex Toolbar
jEasyUI Set Frozen Columns
jEasyUI Dynamically Change Columns
jEasyUI Format Columns
jEasyUI Set Sorting
jEasyUI Custom Sorting
jEasyUI Create Column Groups
jEasyUI Add Checkbox
jEasyUI Custom Pagination
jEasyUI Enable Row Editing
jEasyUI Extend Editor
jEasyUI Column Calculation
jEasyUI Merge Cells
jEasyUI Create Custom View
jEasyUI Create Footer Summary
jEasyUI Conditionally Set Row Background Color
jEasyUI Create PropertyGrid
jEasyUI Expand Row to Show Details
jEasyUI Create SubGrid
jEasyUI Display Massive Data
jEasyUI Add Pagination Component
jEasyUI Window
jEasyUI Create Simple Window
jEasyUI Custom Window Toolbar
jEasyUI Window and Layout
jEasyUI Create Dialog
jEasyUI Custom Dialog
jEasyUI Tree Menu
jEasyUI Create Tree Menu with Markup
jEasyUI Create Async Tree Menu
jEasyUI Add Nodes to Tree Menu
jEasyUI Create Tree Menu with Checkbox
jEasyUI Tree Menu Drag and Drop Control
jEasyUI Tree Menu Load Parent/Child Nodes
jEasyUI Create Basic TreeGrid
jEasyUI Create Complex TreeGrid
jEasyUI TreeGrid Dynamic Loading
jEasyUI TreeGrid Add Pagination
jEasyUI TreeGrid Lazy Load Nodes
jEasyUI Form
jEasyUI Create Async Submit Form
jEasyUI Form Validation
jEasyUI Create Tree ComboBox
jEasyUI Format ComboBox
jEasyUI Filter ComboBox DataGrid
jEasyUI Reference Manual
jQuery EasyUI Plugins
jQuery EasyUI Extensions
Online Examples
·HTML Examples
·CSS Examples
·JavaScript Examples
·Ajax Examples
·jQuery Examples
·XML Examples
·Java Examples
Character Sets & Tools
· HTML Character Set Settings
· HTML ASCII Character Set
· JS Obfuscation/Encryption
· PNG/JPEG Image Compression
· HTML Color Picker
· JSON Formatting Tool
· Random Number Generator
Latest Updates
· Codex Advanced Configuration
· AI Agent Terminology
· ZCode Getting Started Tutorial
· Loop Engineerin...
· Claude Code Us...
· Claude Code Us...
· docker compose ...
Site Information
· Feedback
· Disclaimer
· About Us
· Article Archive
Follow WeChat
My Favorites
Bookmark Article
Browsing History
Clear All
No Records Yet