Menu

1 / 2

Responsive DevExtreme DataGrid for Mobile: One Grid, Two Row Layouts

DEV Community: angular·Vaclav Svara·about 4 hours ago
#EEBgRF3q
#devtoangular#devto#dev#grid#template
Long article (909 words) — no AI summary yet.
Reading 0:00
15s threshold

A wide transaction table can work well on a desktop and become frustrating on a phone. Horizontal scrolling keeps every column available, but readers must move back and forth to understand one record.

For our bank transaction review screen in Billy, we wanted a detailed table on wider screens and a compact, read-only card on narrow screens. The key idea is to keep one dx-data-grid and change its data-row template when available space changes. That keeps one grid instance and one data source responsible for search, filtering, sorting, paging, and remote requests.

Wide layout: a detailed table when there is room for columns. AI-generated illustration.

Use a data row template on narrow screens

DevExtreme DataGrid provides dataRowTemplate for custom data rows. In Angular, the template receives a row object, with the record in item.data. Bind a named template to a responsive state.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.