-
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
-
Context Menu
-
Menu
- Multi View
-
Drawer
-
Tab Panel
-
Tabs
-
Toolbar
-
Stepper
- Pagination
-
List
-
Tree View
- Right-to-Left Support
-
Layout
-
Tile View
- Splitter
-
Gallery
- Scroll View
-
-
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.
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
<div class="options">
<div class="caption">Options</div>
<div class="editors-modes">
<div class="option">
@(Html.DevExtreme().SelectBox()
.ID("styling-mode-selector")
.Items(new[] { "outlined", "filled", "underlined" })
.Value(new JS("stylingMode"))
.InputAttr("aria-label", "Styling Mode")
.Label("Styling Mode")
.LabelMode(EditorLabelMode.Outside)
.OnValueChanged("getValueChangedHandler('stylingMode')")
)
</div>
<div class="option">
@(Html.DevExtreme().SelectBox()
.ID("label-mode-selector")
.Items(new[] { "static", "floating", "hidden", "outside" })
.Value(new JS("labelMode"))
.InputAttr("aria-label", "Label Mode")
.Label("Label Mode")
.LabelMode(EditorLabelMode.Outside)
.OnValueChanged("getValueChangedHandler('labelMode')")
)
</div>
</div>
</div>
<div class="widgets-container">
<div class="title">Edit Profile</div>
@(Html.DevExtreme().TextBox()
.ID("name")
.Value("Olivia Peyton")
.InputAttr("aria-label", "Name")
.Placeholder("Type...")
.Label("Name")
.LabelMode(EditorLabelMode.Static)
)
@(Html.DevExtreme().TextBox()
.ID("address")
.InputAttr("aria-label", "Address")
.Placeholder("Type...")
.Label("Address")
.LabelMode(EditorLabelMode.Static)
)
@(Html.DevExtreme().DateBox()
.ID("birth-date")
.InputAttr("aria-label", "Birth Date")
.Value(new DateTime(1981, 6, 3))
.Placeholder("Select...")
.Label("Birth Date")
.LabelMode(EditorLabelMode.Static)
)
@(Html.DevExtreme().SelectBox()
.ID("state")
.Items(new[] {
"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"
})
.InputAttr("aria-label", "State")
.Placeholder("Select...")
.Label("State")
.LabelMode(EditorLabelMode.Static)
.ValidationMessagePosition(Position.Left)
)
@(Html.DevExtreme().TextBox()
.ID("phone")
.InputAttr("aria-label", "Phone")
.Label("Phone")
.Mask("+1 (X00) 000-0000")
.MaskRules(new { X = new JS("/[02-9]/") })
.LabelMode(EditorLabelMode.Static)
)
@(Html.DevExtreme().DateBox()
.ID("hire-date")
.InputAttr("aria-label", "Hire Date")
.Placeholder("Select...")
.Label("Hire Date")
.LabelMode(EditorLabelMode.Static)
)
@(Html.DevExtreme().DateRangeBox()
.ID("vacation-dates")
.StartDate("6/3/2023")
.StartDateLabel("Start Vacation Date")
.EndDate("12/3/2023")
.EndDateLabel("End Vacation Date")
.LabelMode(EditorLabelMode.Static)
)
@(Html.DevExtreme().TextArea()
.ID("notes")
.Value("Olivia loves to sell. She has been selling DevAV products since 2012.")
.Placeholder("Type...")
.Label("Notes")
.LabelMode(EditorLabelMode.Static)
)
</div>
@(Html.DevExtreme().Button()
.ID("validate")
.Text("Save")
.Icon("save")
.Type(ButtonType.Default)
.OnClick("saveClick")
)
<script>
var stylingMode = "outlined";
var labelMode = "static";
DevExpress.config({
editorStylingMode: stylingMode
});
function saveClick(e) {
var result = e.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");
}
}
function getWidgetsInstances() {
const name = $("#name").dxTextBox("instance");
const address = $("#address").dxTextBox("instance");
const phone = $("#phone").dxTextBox("instance");
const birthDate = $("#birth-date").dxDateBox("instance");
const hireDate = $("#hire-date").dxDateBox("instance");
const vacationDates = $("#vacation-dates").dxDateRangeBox("instance");
const state = $("#state").dxSelectBox("instance");
const notes = $("#notes").dxTextArea("instance");
return [name, address, birthDate, hireDate, vacationDates, state, phone, notes];
}
const getValueChangedHandler = (optionName) => ({ value }) => {
getWidgetsInstances().forEach((editor) => {
editor.option(optionName, value);
});
};
$(function() {
["name", "address", "birth-date", "hire-date", "state", "phone"].forEach((editorId) => {
$("#" + editorId).dxValidator({
validationRules: [{ type: "required" }]
});
});
});
</script>
using DevExtreme.AspNet.Data;
using DevExtreme.AspNet.Mvc;
using DevExtreme.MVC.Demos.Models;
using DevExtreme.MVC.Demos.Models.SampleData;
using DevExtreme.MVC.Demos.ViewModels;
using System;
using System.Linq;
using System.Text.Json;
using System.Web.Mvc;
namespace DevExtreme.MVC.Demos.Controllers {
public class CommonController : Controller {
public ActionResult EditorAppearanceVariants() {
return View();
}
}
}
.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;
}
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.