-
Data Grids / Data Management
-
Data Grid
- Overview
-
Data Binding
-
Filtering
- Sorting
-
Editing
-
Grouping
-
Selection
- Focused Row
- Paging
-
Scrolling
-
Columns
-
Master-Detail
-
Data Summaries
-
Drag & Drop
-
Export to PDF
-
Export to Excel
- Appearance
-
Customization
- State Persistence
-
Adaptability
-
Keyboard Navigation
- Right-To-Left Support
-
Tree List
- Overview
-
Data Binding
-
Filtering
- Sorting
-
Editing
-
Selection
- Focused Row
- Paging
-
Columns
- Drag & Drop
- State Persistence
- Adaptability
-
Keyboard Navigation
-
Card View
-
Pivot Grid
- Overview
-
Data Binding
-
Field Management
-
Data Summaries
- Drill Down
- Filtering
-
Scrolling
-
Export to Excel
- Chart Integration
- Customization
- State Persistence
-
Filter Builder
-
-
Data Visualization
-
Charts
- Overview
-
Data Binding
-
Common Concepts
-
Axis
-
Aggregation
-
Tooltips
-
Selection
-
Customization
-
Zooming
-
Export
-
-
Area Charts
-
Bar Charts
- Bullet Charts
-
Doughnut Charts
-
Financial Charts
-
Funnel and Pyramid Charts
-
Line Charts
- Pareto Chart
-
Pie Charts
-
Point Charts
-
Polar and Radar Charts
-
Range Charts
- Sankey Chart
-
Sparkline Charts
-
Tree Map
-
Gauges
- Overview
-
Runtime update
-
Bar Gauge
-
Circular Gauge
-
Linear Gauge
-
Diagram
- Overview
-
Data Binding
-
Featured Shapes
-
Custom Shapes
-
Document Capabilities
-
User Interaction
- UI Customization
- Adaptability
-
-
Scheduling / Planning
-
Scheduler
- Overview
-
Data Binding
-
Views
-
Appointments
-
Timetable
- Editing
-
Grouping
- Virtual Scrolling
- Drag & Drop
-
Customization
- Adaptability
-
Gantt
- Overview
- Data Binding
-
Filtering
- Sorting
- Strip Lines
- Export to PDF
- Validation
-
Customization
-
-
Messaging
-
WYSIWYG Editor
-
Forms
-
Data Editors
- Overview
-
Common Concepts
-
Calendar
- Check Box
- Color Box
-
Date Box
-
Date Range Box
-
Number Box
- Radio Group
-
Range Selector
- Range Slider
- Slider
- Switch
- Text Area
- Text Box
-
Drop-Downs
- Autocomplete
-
Drop Down Box
-
Select Box
-
Tag Box
-
Lookup
-
Buttons
-
File Upload / File Management
-
File Manager
- Overview
-
File System Types
-
Customization
-
File Uploader
-
-
Popup and Notifications
-
Navigation
- Overview
- Accordion
-
Action Sheet
-
Context Menu
-
Menu
- Multi View
-
Drawer
-
Tab Panel
-
Tabs
-
Toolbar
-
Stepper
- Pagination
-
List
-
Tree View
- Right-to-Left Support
-
Layout
-
Interactive Wrappers
-
Sortable
- Resizable
-
-
Progress Indicators
-
Maps
- Overview
-
Map
-
Vector Map
-
Data Binding
- Multiple Layers
-
Markers
- Legend
-
Zooming and Panning
-
Customization
-
-
Localization
JavaScript/jQuery Data Grid - Edit State Management
Our JavaScript DataGrid component manages its edit state automatically. If your use case requires full control over the editing process, you can use the API members below to manage state manually.
If you have technical questions, please create a support ticket in the DevExpress Support Center.
Component Properties
-
editing.editRowKey
The key for the row being edited. -
editing.editColumnName
The name or data field of the column being edited. -
editing.changes
Pending row changes.
You can get and set these properties at runtime to access and change edit state. In this demo, the onOptionChanged function gets editRowKey and changes property values and displays them under the JavaScript DataGrid.
Utility Method
- DevExpress.data.applyChanges(data, changes, options)
Applies an array of changes to a source data array.
Event Handlers
-
onSaving / onSaved
Functions that are called before / after pending row changes are saved via the UI or programmatically. -
onEditCanceling / onEditCanceled
Functions that are called before / after editing is canceled and pending row changes are discarded.
Use these functions to perform custom actions. In this demo, the onSaving function sends pending changes to a server. The function's parameter e
contains fields for this capability. To implement the same in your application, follow these steps:
-
Disable built-in edit state management
Set thee.cancel
field to true. -
Send a request to the server
Pending changes are stored in thee.changes
array. This array has only a single element in all edit modes, except for batch. Check if this element is not empty and send it to the server. -
Apply the same changes to a local array
If the server successfully saves changes, call the applyChanges method to save the same changes in a local array. -
Update the JavaScript DataGrid's data source and reset edit state
Assign the local array to the dataSource, null to the editRowKey, and an empty array to the changes property.