-
Data Grid
- Overview
-
Data Binding
-
Paging and Scrolling
-
Editing
-
Grouping
-
Filtering and Sorting
- Focused Row
-
Row Drag & Drop
-
Selection
-
Columns
- State Persistence
-
Appearance
-
Templates
-
Data Summaries
-
Master-Detail
-
Export to PDF
-
Export to Excel
-
Adaptability
- Keyboard Navigation
-
Pivot Grid
- Overview
-
Data Binding
-
Field Chooser
-
Features
-
Export to Excel
-
Tree List
- Overview
-
Data Binding
- Sorting
- Paging
-
Editing
- Node Drag & Drop
- Focused Row
-
Selection
-
Filtering
-
Column Customization
- State Persistence
- Adaptability
- Keyboard Navigation
-
Scheduler
- Overview
-
Data Binding
-
Views
-
Features
- Virtual Scrolling
-
Grouping
-
Customization
- Adaptability
-
Html Editor
-
Chat
-
Diagram
- Overview
-
Data Binding
-
Featured Shapes
-
Custom Shapes
-
Document Capabilities
-
User Interaction
- UI Customization
- Adaptability
-
Charts
- Overview
-
Data Binding
-
Area Charts
-
Bar Charts
- Bullet Charts
-
Doughnut Charts
-
Financial Charts
-
Line Charts
-
Pie Charts
-
Point Charts
-
Polar and Radar Charts
-
Range Charts
-
Sparkline Charts
-
Tree Map
-
Funnel and Pyramid Charts
- Sankey Chart
-
Combinations
-
More Features
-
Export
-
Selection
-
Tooltips
-
Zooming
-
-
Gantt
- Overview
-
Data
-
UI Customization
- Strip Lines
- Export to PDF
- Sorting
-
Filtering
-
Gauges
- Overview
-
Data Binding
-
Bar Gauge
-
Circular Gauge
-
Linear Gauge
-
Navigation
- Overview
- Accordion
-
Menu
- Multi View
-
Drawer
-
Tab Panel
-
Tabs
-
Toolbar
- Pagination
-
Tree View
- Right-to-Left Support
-
Layout
-
Tile View
- Splitter
-
Gallery
- Scroll View
- Resizable
-
-
Editors
- Overview
- Autocomplete
-
Calendar
- Check Box
- Color Box
- Date Box
-
Date Range Box
-
Drop Down Box
-
Number Box
-
Select Box
- Switch
-
Tag Box
- Text Area
- Text Box
- Validation
- Custom Text Editor Buttons
- Right-to-Left Support
- Editor Appearance Variants
-
Forms and Multi-Purpose
- Overview
- Button Group
- Field Set
-
Filter Builder
-
Form
- Radio Group
-
Range Selector
- Numeric Scale (Lightweight)
- Numeric Scale
- Date-Time Scale (Lightweight)
- Date-Time Scale
- Logarithmic Scale
- Discrete scale
- Custom Formatting
- Use Range Selection for Calculation
- Use Range Selection for Filtering
- Image on Background
- Chart on Background
- Customized Chart on Background
- Chart on Background with Series Template
- Range Slider
- Slider
-
Sortable
-
File Management
-
File Manager
- Overview
-
File System Types
-
Customization
-
File Uploader
-
-
Actions and Lists
-
Maps
- Overview
-
Map
-
Vector Map
-
Dialogs and Notifications
-
Localization
Data Grid - Form Editing
The DataGrid can use the Form component to arrange cell editors when users modify a row. The Form allows users to edit values from visible and hidden columns (see the Notes
column).
To enable form edit mode, configure the following properties:
- Set editing.mode to "form"
- Assign true to the editing object's allowAdding, allowUpdating, and allowDeleting properties.
If you have technical questions, please create a support ticket in the DevExpress Support Center.
<div id="data-grid-demo">
@(Html.DevExtreme().DataGrid<DevExtreme.MVC.Demos.Models.DataGrid.Employee>()
.ID("gridContainer")
.Paging(paging => paging.Enabled(false))
.ShowBorders(true)
.Editing(editing => {
editing.Mode(GridEditMode.Form);
editing.AllowUpdating(true);
editing.AllowAdding(true);
editing.AllowDeleting(true);
})
.Columns(columns => {
columns.AddFor(m => m.Prefix)
.Width(70);
columns.AddFor(m => m.FirstName);
columns.AddFor(m => m.LastName);
columns.AddFor(m => m.Position)
.Width(170);
columns.AddFor(m => m.StateID)
.Width(125)
.Lookup(lookup => lookup
.DataSource(d => d.WebApi().Controller("DataGridStatesLookup").Key("ID"))
.DisplayExpr("Name")
.ValueExpr("ID")
);
columns.AddFor(m => m.BirthDate);
columns.AddFor(m => m.Notes)
.Visible(false)
.FormItem(i => i
.Editor(e => e
.TextArea()
.InputAttr("aria-label", "Notes")
.Height(100))
.ColSpan(2)
);
})
.DataSource(d => d.WebApi().Controller("DataGridEmployees").UpdateAction(true).InsertAction(true).DeleteAction(true).Key("ID"))
)
</div>
xxxxxxxxxx
xxxxxxxxxx
xxxxxxxxxx
xxxxxxxxxx
xxxxxxxxxx
xxxxxxxxxx
xxxxxxxxxx
A column's default editor is defined automatically based on this column's dataType. To customize this editor or replace it with another editor, use the column's formItem object. This demo shows how to replace the default editor in the Notes
column with a TextArea. Refer to the SimpleItem help topic for information on all settings that you can define in the formItem object. If you need more information about editor customization in DataGrid Form, review the following topic: Customize Edit Form.
You can also set up the edit Form from scratch. The component's configuration section lists available settings. Specify these settings in the editing.form object. Refer to this object's description for more information about this edit mode's limitations.