-
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
Data Grid - Custom New Record Position
The DevExtreme DataGrid API includes a newRowPosition property. With this property, you can specify the desired "new record" position as follows.
If you have technical questions, please create a support ticket in the DevExpress Support Center.
-
"viewportTop" (default)
Insert a new row at the top of the viewport. -
"viewportBottom"
Insert a new row at the bottom of the viewport. -
"pageTop"
Insert a new row at the top of the current page. In virtual and infinite scrolling modes, "pageTop" works like "viewportTop". -
"pageBottom"
Insert a new row at the bottom of the current page. In virtual and infinite scrolling modes, "pageBottom" works like "viewportBottom". -
"first"
Navigate to the beginning of the dataset and insert a new row at the top. -
"last"
Navigate to the end of the dataset and insert a new row at the bottom. Does not apply in infinite scrolling mode.
In this demo, you can use a drop-down menu to change the newRowPosition property value at runtime. To see how your choice affects "new record" position, click the "Add a row" button in the toolbar. This demo also allows you to switch between standard and virtual scrolling modes (you can also see how newRowPosition works with each scrolling mode).
If you wish to position new records in a more flexible manner, you can specify the key before/after which a new record must be inserted. To apply this feature, set the insertBeforeKey or insertAfterKey property in the pending changes array. In this demo, each row contains an "Add row" button that inserts a new row after the current row. The insertAfterKey property is used to implement this functionality. Review the button's onClick event handler for more information.
A new record remains at a specified position until it is saved. Once saved, the DevExtreme DataGrid reloads data and sorts all records. As a result, the saved record may appear outside the viewport. To navigate to this record, call the navigateToRow(key) method from the onRowInserted event handler (as illustrated in this demo). As an alternative, you can set the refreshMode to "repaint". In this instance, the record retains its custom position after a save operation (however, position may change once data is shaped in the future).