-
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
Related Demos:
Your search did not match any results.
JavaScript/jQuery Data Editors - Editor Appearance Variants
DevExtreme Editors include the following appearance customization properties:
-
stylingMode: "filled" | "outlined" | "underlined"
Specifies the style used for text fields. -
labelMode: "static" | "floating" | "hidden" | "outside"
Specifies label display mode.
Was this demo helpful?
Feel free to share demo-related thoughts here.
If you have technical questions, please create a support ticket in the DevExpress Support Center.
Thank you for the feedback!
If you have technical questions, please create a support ticket in the DevExpress Support Center.
Backend API
$(() => {
const stylingMode = 'outlined';
const labelMode = 'static';
DevExpress.config({
editorStylingMode: stylingMode,
});
const name = $('#name').dxTextBox({
value: 'Olivia Peyton',
placeholder: 'Type...',
inputAttr: { 'aria-label': 'Name' },
label: 'Name',
labelMode,
}).dxValidator({
validationRules: [{
type: 'required',
}],
}).dxTextBox('instance');
const place = $('#address').dxTextBox({
placeholder: 'Type...',
inputAttr: { 'aria-label': 'Address' },
label: 'Address',
labelMode,
}).dxValidator({
validationRules: [{
type: 'required',
}],
}).dxTextBox('instance');
const birthDate = $('#birth-date').dxDateBox({
label: 'Birth Date',
placeholder: 'Select...',
value: '6/3/1981',
inputAttr: { 'aria-label': 'Birth Date' },
labelMode,
}).dxValidator({
validationRules: [{
type: 'required',
}],
}).dxDateBox('instance');
const hireDate = $('#hire-date').dxDateBox({
label: 'Hire Date',
placeholder: 'Select...',
inputAttr: { 'aria-label': 'Hire Date' },
labelMode,
}).dxValidator({
validationRules: [{
type: 'required',
}],
}).dxDateBox('instance');
const range = $('#vacation-dates').dxDateRangeBox({
startDate: '6/3/2023',
startDateLabel: 'Start Vacation Date',
endDate: '12/3/2023',
endDateLabel: 'End Vacation Date',
labelMode,
}).dxDateRangeBox('instance');
const state = $('#state').dxSelectBox({
items: states,
inputAttr: { 'aria-label': 'State' },
placeholder: 'Select...',
label: 'State',
labelMode,
validationMessagePosition: 'left',
}).dxValidator({
validationRules: [{
type: 'required',
}],
}).dxSelectBox('instance');
const phone = $('#phone').dxTextBox({
label: 'Phone',
mask: '+1 (000) 000-0000',
inputAttr: { 'aria-label': 'Phone' },
maskRules: {
X: /[02-9]/,
},
labelMode,
}).dxValidator({
validationRules: [{
type: 'required',
}],
}).dxTextBox('instance');
const notes = $('#notes').dxTextArea({
value: 'Olivia loves to sell. She has been selling DevAV products since 2012.',
placeholder: 'Type...',
label: 'Notes',
labelMode,
inputAttr: { 'aria-label': 'Notes' },
}).dxTextArea('instance');
$('#validate').dxButton({
text: 'Save',
icon: 'save',
type: 'default',
onClick({ validationGroup }) {
const result = validationGroup.validate();
if (result.isValid) {
DevExpress.ui.notify('The task was saved successfully.', 'success');
} else {
DevExpress.ui.notify('The task was not saved. Please check if all fields are valid.', 'error');
}
},
});
const getValueChangedHandler = (optionName) => ({ value }) => {
[name, place, birthDate, hireDate, range, state, phone, notes].forEach((editor) => {
editor.option(optionName, value);
});
};
$('#styling-mode-selector').dxSelectBox({
items: ['outlined', 'filled', 'underlined'],
value: 'outlined',
label: 'Styling Mode',
labelMode: 'outside',
inputAttr: { 'aria-label': 'Styling Mode' },
onValueChanged: getValueChangedHandler('stylingMode'),
}).dxSelectBox('instance');
$('#label-mode-selector').dxSelectBox({
items: ['static', 'floating', 'hidden', 'outside'],
value: 'static',
label: 'Label Mode',
labelMode: 'outside',
inputAttr: { 'aria-label': 'Label Mode' },
onValueChanged: getValueChangedHandler('labelMode'),
}).dxSelectBox('instance');
});
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
<head>
<title>DevExtreme Demo</title>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=5.0" />
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script>window.jQuery || document.write(decodeURIComponent('%3Cscript src="js/jquery.min.js"%3E%3C/script%3E'))</script>
<link rel="stylesheet" type="text/css" href="https://cdn3.devexpress.com/jslib/25.1.3/css/dx.light.css" />
<script src="js/dx.all.js"></script>
<link rel="stylesheet" type="text/css" href="styles.css" />
<script src="index.js"></script>
<script src="data.js"></script>
</head>
<body class="dx-viewport">
<div class="demo-container">
<div class="options">
<div class="caption">Options</div>
<div class="editors-modes">
<div class="option">
<div id="styling-mode-selector"></div>
</div>
<div class="option">
<div id="label-mode-selector"></div>
</div>
</div>
</div>
<div class="widgets-container">
<div class="title">Edit Profile</div>
<div id="name"></div>
<div id="address"></div>
<div id="birth-date"></div>
<div id="state"></div>
<div id="phone"></div>
<div id="hire-date"></div>
<div id="vacation-dates"></div>
<div id="notes"></div>
</div>
<div id="validate"></div>
</div>
</body>
</html>
.demo-container {
height: 680px;
}
.widgets-container {
display: grid;
grid-template-areas:
'title title title title'
'name name birthDate birthDate '
'address address state phone'
'hireDate hireDate range range'
'notes notes notes notes';
grid-template-columns: 1fr 1fr 1fr 1fr;
gap: 20px;
padding-left: 20px;
padding-right: 20px;
}
.title {
grid-area: title;
font-size: 18px;
font-weight: 500;
}
#name {
grid-area: name;
}
#address {
grid-area: address;
}
#birth-date {
grid-area: birthDate;
}
#state {
grid-area: state;
}
#phone {
grid-area: phone;
}
#hire-date {
grid-area: hireDate;
}
#notes {
grid-area: notes;
}
#vacation-dates {
grid-area: range;
}
#validate {
float: right;
margin-top: 20px;
margin-right: 20px;
width: 100px;
}
.options {
grid-area: options;
padding: 20px;
margin-bottom: 40px;
background-color: rgba(191, 191, 191, 0.15);
}
.caption {
font-size: 18px;
font-weight: 500;
}
.editors-modes {
display: flex;
}
.option {
padding-right: 20px;
margin-top: 20px;
}
const states = ['AL', 'AK', 'AZ', 'AR', 'CA', 'CO', 'CT', 'DE', 'FL', 'GA', 'HI', 'ID', 'IL', 'IN', 'IA', 'KS', 'KY', 'LA', 'ME', 'MD', 'MA', 'MI', 'MN', 'MS', 'MO', 'MT', 'NE', 'NV', 'NH', 'NJ', 'NM', 'NY', 'NC', 'ND', 'OH', 'OK', 'OR', 'PA', 'RI', 'SC', 'SD', 'TN', 'TX', 'UT', 'VT', 'VA', 'WA', 'WV', 'WI', 'WY'];
To specify styles globally (as an alternative to stylingMode), set the editorStylingMode property instead (editorStylingMode applies the same style to all editors on the page).
In this demo, you can use the "Styling Mode/Label Mode" drop down box (in the Options section) to modify styling and label modes.