-- 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 Creating a CRUD Application
jEasyUI Creating a CRUD DataGrid
jEasyUI CRUD Application with Forms
jEasyUI Creating an RSS Reader
jEasyUI Drag and Drop
jEasyUI Basic Drag and Drop
jEasyUI Creating a Drag and Drop Shopping Cart
jEasyUI Creating a School Timetable
jEasyUI Menu and Buttons
jEasyUI Creating a Simple Menu
jEasyUI Creating Link Buttons
jEasyUI Creating Menu Buttons
jEasyUI Creating Split Buttons
jEasyUI Layout
jEasyUI Creating a Border Layout
jEasyUI Creating a Complex Layout
jEasyUI Creating an Accordion
jEasyUI Creating Tabs
jEasyUI Dynamically Adding Tabs
jEasyUI Adding Auto-playing Tabs
jEasyUI Creating an XP-style Left Panel
jEasyUI DataGrid
jEasyUI Converting an HTML Table to a DataGrid
jEasyUI Getting Selected Row Data
jEasyUI Adding Search Functionality
jEasyUI Adding a Toolbar
jEasyUI Creating a Complex Toolbar
jEasyUI Setting Frozen Columns
jEasyUI Dynamically Changing Columns
jEasyUI Formatting Columns
jEasyUI Setting Sorting
jEasyUI Custom Sorting
jEasyUI Creating Column Groups
jEasyUI Adding Checkboxes
jEasyUI Custom Pagination
jEasyUI Enabling Inline Editing
jEasyUI Extending Editors
jEasyUI Column Calculation
jEasyUI Merging Cells
jEasyUI Creating a Custom View
jEasyUI Creating a Footer Summary
jEasyUI Setting Row Background Color Conditionally
jEasyUI Creating a PropertyGrid
jEasyUI Expanding Row Details
jEasyUI Creating a Sub-DataGrid
jEasyUI Displaying Large Data Sets
jEasyUI Adding Pagination Component
jEasyUI Window
jEasyUI Creating a Simple Window
jEasyUI Customizing Window Toolbar
jEasyUI Window and Layout
jEasyUI Creating a Dialog
jEasyUI Customizing a Dialog
jEasyUI Tree
jEasyUI Creating a Tree from Markup
jEasyUI Creating an Async Tree
jEasyUI Adding Nodes to a Tree
jEasyUI Creating a Tree with Checkboxes
jEasyUI Tree Drag and Drop Control
jEasyUI Tree Loading Parent/Child Nodes
jEasyUI Creating a Basic TreeGrid
jEasyUI Creating a Complex TreeGrid
jEasyUI TreeGrid Dynamic Loading
jEasyUI TreeGrid Adding Pagination
jEasyUI TreeGrid Lazy Loading Nodes
jEasyUI Form
jEasyUI Creating an Async Submit Form
jEasyUI Form Validation
jEasyUI Creating a Tree Datalist
jEasyUI Formatting a Datalist
jEasyUI Filtering a Datalist DataGrid
jEasyUI Reference
jQuery EasyUI Plugins
jQuery EasyUI Extensions
jQuery EasyUI Application β Creating a CRUD Application
jQuery EasyUI Application β Creating a CRUD Application with Expandable Row Detail Editing Form
jQuery EasyUI Application - Creating a CRUD DataGrid (DataGrid)
In the previous chapter, we used the dialog component to create a CRUD application for creating and editing user information. In this tutorial, we will show you how to create a CRUD DataGrid. We will use the Editable DataGrid plugin to perform these CRUD operations.
Step 1: Define the DataGrid in HTML Tags
| First Name |
Last Name |
Phone |
Email |
Step 2: Use the Editable DataGrid
$('#dg').edatagrid({
url: 'get_users.php',
saveUrl: 'save_user.php',
updateUrl: 'update_user.php',
destroyUrl: 'destroy_user.php'
});
We should provide the 'url', 'saveUrl', 'updateUrl', and 'destroyUrl' properties to edit the DataGrid:
url: Retrieve user data from the server side.
saveUrl: Save new user data.
updateUrl: Update existing user data.
destroyUrl: Delete existing user data.
Step 3: Write Server-side Processing Code
Save a new user (save_user.php):
$firstname = $_REQUEST['firstname'];
$lastname = $_REQUEST['lastname'];
$phone = $_REQUEST['phone'];
$email = $_REQUEST['email'];
include 'conn.php';
$sql = "insert into users(firstname,lastname,phone,email) values('$firstname','$lastname','$phone','$email')";
@mysql_query($sql);
echo json_encode(array(
'id' => mysql_insert_id(),
'firstname' => $firstname,
'lastname' => $lastname,
'phone' => $phone,
'email' => $email
));
Update an existing user (update_user.php):
$id = intval($_REQUEST['id']);
$firstname = $_REQUEST['firstname'];
$lastname = $_REQUEST['lastname'];
$phone = $_REQUEST['phone'];
$email = $_REQUEST['email'];
include 'conn.php';
$sql="update users set firstname='$firstname',lastname='$lastname',phone='$phone',email='$email' where id=$id";
@mysql_query($sql);
echo json_encode(array(
'id' => $id,
'firstname' => $firstname,
'lastname' => $lastname,
'phone' => $phone,
'email' => $email
));
Delete an existing user (destroy_user.php):
$id = intval($_REQUEST['id']);
include 'conn.php';
$sql = "delete from users where id=$id";
@mysql_query($sql);
echo json_encode(array('success'=>true));
Download jQuery EasyUI Example
jeasyui-app-crud2.zip
jQuery EasyUI Application β Creating a CRUD Application
jQuery EasyUI Application β Creating a CRUD Application with Expandable Row Detail Editing Form
ByteArk Coding Plan
Supports mainstream large models like Doubao, GLM, DeepSeek, Kimi, MiniMax, officially supplied, stable and reliable.
Configuration Guide
Β₯9.9
/ month
Subscribe Now
iFlytek Spark Coding Plan
Includes free model call quota, DeepSeek, GLM, Kimi, MiniMax, one-stop experience and deployment platform.
Configuration Guide
Β₯3.9
/ month
Subscribe 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
Deep Dive
Software
Technical Reference Information
Programming
Software Utilities
Computer Science
Web Service
Network Services
Scripts
jQuery EasyUI Tutorial
jQuery EasyUI Tutorial
jQuery EasyUI Introduction
jEasyUI Applications
jEasyUI Creating a CRUD Application
jEasyUI Creating a CRUD DataGrid
jEasyUI CRUD Application with Forms
jEasyUI Creating an RSS Reader
jEasyUI Drag and Drop
jEasyUI Basic Drag and Drop
jEasyUI Creating a Drag and Drop Shopping Cart
jEasyUI Creating a School Timetable
jEasyUI Menu and Buttons
jEasyUI Creating a Simple Menu
jEasyUI Creating Link Buttons
jEasyUI Creating Menu Buttons
jEasyUI Creating Split Buttons
jEasyUI Layout
jEasyUI Creating a Border Layout
jEasyUI Creating a Complex Layout
jEasyUI Creating an Accordion
jEasyUI Creating Tabs
jEasyUI Dynamically Adding Tabs
jEasyUI Adding Auto-playing Tabs
jEasyUI Creating an XP-style Left Panel
jEasyUI DataGrid
jEasyUI Converting an HTML Table to a DataGrid
jEasyUI Getting Selected Row Data
jEasyUI Adding Search Functionality
jEasyUI Adding a Toolbar
jEasyUI Creating a Complex Toolbar
jEasyUI Setting Frozen Columns
jEasyUI Dynamically Changing Columns
jEasyUI Formatting Columns
jEasyUI Setting Sorting
jEasyUI Custom Sorting
jEasyUI Creating Column Groups
jEasyUI Adding Checkboxes
jEasyUI Custom Pagination
jEasyUI Enabling Inline Editing
jEasyUI Extending Editors
jEasyUI Column Calculation
jEasyUI Merging Cells
jEasyUI Creating a Custom View
jEasyUI Creating a Footer Summary
jEasyUI Setting Row Background Color Conditionally
jEasyUI Creating a PropertyGrid
jEasyUI Expanding Row Details
jEasyUI Creating a Sub-DataGrid
jEasyUI Displaying Large Data Sets
jEasyUI Adding Pagination Component
jEasyUI Window
jEasyUI Creating a Simple Window
jEasyUI Customizing Window Toolbar
jEasyUI Window and Layout
jEasyUI Creating a Dialog
jEasyUI Customizing a Dialog
jEasyUI Tree
jEasyUI Creating a Tree from Markup
jEasyUI Creating an Async Tree
jEasyUI Adding Nodes to a Tree
jEasyUI Creating a Tree with Checkboxes
jEasyUI Tree Drag and Drop Control
jEasyUI Tree Loading Parent/Child Nodes
jEasyUI Creating a Basic TreeGrid
jEasyUI Creating a Complex TreeGrid
jEasyUI TreeGrid Dynamic Loading
jEasyUI TreeGrid Adding Pagination
jEasyUI TreeGrid Lazy Loading Nodes
jEasyUI Form
jEasyUI Creating an Async Submit Form
jEasyUI Form Validation
jEasyUI Creating a Tree Datalist
jEasyUI Formatting a Datalist
jEasyUI Filtering a Datalist DataGrid
jEasyUI Reference
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
Mark Article
Browsing History
Clear All
No records yet