-
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
-
Reporting
-
Interaction
-
Report Types
-
Data binding
-
Real-life Reports
-
Layout Features
-
Report Controls
-
Web-specific Features
-
-
Rich Text Editor
- Overview
- Load/Save
- Document Protection
-
Templates
- Autocorrect
-
Customization
- Simple View
-
Spreadsheet
- Overview
-
Open a Document
- Export And Printing
-
Features
-
UI Customization
-
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
Related Demos:
Your search did not match any results.
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"))
.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"))
.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 System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using DevExtreme.AspNet.Mvc;
using Newtonsoft.Json;
using DevExtreme.AspNet.Data;
using DevExtreme.NETCore.Demos.Models;
using DevExtreme.NETCore.Demos.Models.SampleData;
using DevExtreme.NETCore.Demos.ViewModels;
using DevExtreme.NETCore.Demos.Models.DataGrid;
// For more information on enabling MVC for empty projects, visit http://go.microsoft.com/fwlink/?LinkID=397860
namespace DevExtreme.NETCore.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.