/syncfusion-flutter:syncfusion-flutter-datagridfrom Syncfusion Flutter Widgets
Implements Syncfusion Flutter DataGrid (SfDataGrid) for displaying and manipulating tabular data in Flutter applications. Use when working with data grids, data tables, or column-based data presentation using the syncfusion_flutter_datagrid package. This skill covers DataGridSource, GridColumn configuration, sorting, filtering, paging, editing, and selection.
Ships in Syncfusion Flutter Widgets. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
A comprehensive skill for implementing and customizing the Syncfusion Flutter DataGrid (SfDataGrid) control. The DataGrid displays and manipulates data in a tabular format with support for columns, editing, sorting, filtering, grouping, summaries, paging, and export features.
Use this skill when you need to:
The Syncfusion Flutter DataGrid (SfDataGrid) is a high-performance data grid control for displaying and manipulating tabular data in Flutter applications. It supports comprehensive data management features including sorting, filtering, grouping, and summarization. The grid is highly customizable and optimized for both small and large datasets with efficient virtualization and paging support.
SfDataGrid excels at:
📄 Read: references/getting-started.md
📄 Read: references/data-binding.md
📄 Read: references/column-types.md
📄 Read: references/column-sizing.md
📄 Read: references/column-resizing.md
📄 Read: references/column-drag-and-drop.md
📄 Read: references/stacked-headers.md
📄 Read: references/freeze-panes.md
📄 Read: references/scrolling.md
📄 Read: references/editing.md
📄 Read: references/sorting.md
📄 Read: references/filtering.md
📄 Read: references/selection.md
📄 Read: references/grouping.md
📄 Read: references/summaries.md
📄 Read: references/paging.md
📄 Read: references/load-more.md
📄 Read: references/pull-to-refresh.md
📄 Read: references/row-height-customization.md
📄 Read: references/swiping.md
📄 Read: references/styles.md
📄 Read: references/conditional-styling.md
📄 Read: references/placeholder.md
📄 Read: references/export-to-excel.md
📄 Read: references/export-to-pdf.md
📄 Read: references/footer.md
📄 Read: references/accessibility.md
📄 Read: references/localization.md
📄 Read: references/right-to-left.md
# Always installs the latest compatible version automatically
flutter pub add syncfusion_flutter_datagrid
Always install the package via terminal — do not edit
pubspec.yamldirectly. Run this command from the Flutter project root and wait for it to complete successfully before proceeding.
class OrderInfo {
int orderId;
String customerId;
String shipCountry;
double freight;
DateTime orderDate;
OrderInfo({
required this.orderId,
required this.customerId,
required this.shipCountry,
required this.freight,
required this.orderDate,
});
}
import 'package:syncfusion_flutter_datagrid/datagrid.dart';
class OrderDataSource extends DataGridSource {
late List<OrderInfo> _orders;
OrderDataSource(List<OrderInfo> orders) {
_orders = orders;
buildDataGridRows();
}
List<DataGridRow> dataGridRows = [];
@override
List<DataGridRow> get rows => dataGridRows;
void buildDataGridRows() {
dataGridRows = _orders
.map<DataGridRow>((order) => DataGridRow(cells: [
DataGridCell<int>(columnName: 'orderId', value: order.orderId),
DataGridCell<String>(columnName: 'customerId', value: order.customerId),
DataGridCell<String>(columnName: 'shipCountry', value: order.shipCountry),
DataGridCell<double>(columnName: 'freight', value: order.freight),
DataGridCell<DateTime>(columnName: 'orderDate', value: order.orderDate),
]))
.toList();
}
@override
DataGridRowAdapter? buildRow(DataGridRow row) {
return DataGridRowAdapter(cells: [
Container(
alignment: Alignment.centerRight,
padding: const EdgeInsets.all(8.0),
child: Text(row.getCells()[0].value.toString()),
),
Container(
alignment: Alignment.centerLeft,
padding: const EdgeInsets.all(8.0),
child: Text(row.getCells()[1].value.toString()),
),
Container(
alignment: Alignment.centerLeft,
padding: const EdgeInsets.all(8.0),
child: Text(row.getCells()[2].value.toString()),
),
Container(
alignment: Alignment.centerRight,
padding: const EdgeInsets.all(8.0),
child: Text('\$${row.getCells()[3].value.toStringAsFixed(2)}'),
),
Container(
alignment: Alignment.centerLeft,
padding: const EdgeInsets.all(8.0),
child: Text(row.getCells()[4].value.toString().split(' ')[0]),
),
]);
}
}
import 'package:flutter/material.dart';
import 'package:syncfusion_flutter_datagrid/datagrid.dart';
class DataGridPage extends StatefulWidget {
const DataGridPage({Key? key}) : super(key: key);
@override
State<DataGridPage> createState() => _DataGridPageState();
}
class _DataGridPageState extends State<DataGridPage> {
late List<OrderInfo> _orders;
late OrderDataSource _orderDataSource;
@override
void initState() {
super.initState();
_orders = getOrders();
_orderDataSource = OrderDataSource(_orders);
}
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: const Text('DataGrid'),
),
body: SfDataGrid(
source: _orderDataSource,
columns: [
GridColumn(
columnName: 'orderId',
label: Container(
padding: const EdgeInsets.all(16.0),
alignment: Alignment.centerRight,
child: const Text('Order ID'),
),
),
GridColumn(
columnName: 'customerId',
label: Container(
padding: const EdgeInsets.all(16.0),
alignment: Alignment.centerLeft,
child: const Text('Customer Name'),
),
),
GridColumn(
columnName: 'shipCountry',
label: Container(
padding: const EdgeInsets.all(16.0),
alignment: Alignment.centerLeft,
child: const Text('Ship Country'),
),
),
GridColumn(
columnName: 'freight',
label: Container(
padding: const EdgeInsets.all(16.0),
alignment: Alignment.centerRight,
child: const Text('Freight'),
),
),
GridColumn(
columnName: 'orderDate',
label: Container(
padding: const EdgeInsets.all(16.0),
alignment: Alignment.centerLeft,
child: const Text('Order Date'),
),
),
],
),
);
}
List<OrderInfo> getOrders() {
return [
OrderInfo(
orderId: 1001,
customerId: 'ALFKI',
shipCountry: 'Germany',
freight: 32.38,
orderDate: DateTime(2024, 01, 15),
),
OrderInfo(
orderId: 1002,
customerId: 'FRANS',
shipCountry: 'Mexico',
freight: 11.61,
orderDate: DateTime(2024, 01, 14),
),
OrderInfo(
orderId: 1003,
customerId: 'MEREP',
shipCountry: 'Canada',
freight: 45.34,
orderDate: DateTime(2024, 01, 13),
),
];
}
}
| Property | Type | Description |
|---|---|---|
source | DataGridSource | Data source for the grid (required) |
columns | List | Column definitions (required) |
rowHeight | double | Default row height |
headerRowHeight | double | Height of header row |
allowSorting | bool | Enable sorting |
allowMultiColumnSorting | bool | Enable multi-column sorting |
allowFiltering | bool | Enable filtering |
allowEditing | bool | Enable cell editing |
navigationMode | GridNavigationMode | Row or Cell navigation |
selectionMode | SelectionMode | None, Single, or Multiple |
frozenColumnsCount | int | Number of frozen columns from left |
frozenRowsCount | int | Number of frozen rows from top |
columnWidthMode | ColumnWidthMode | Auto, Fill, None |
Enable single and multi-column sorting with visual indicators:
SfDataGrid(
source: _employeeDataSource,
allowSorting: true,
allowMultiColumnSorting: true,
allowTriStateSorting: true,
showSortNumbers: true,
columns: _columns,
)
Add programmatic sorting:
_employeeDataSource.sortedColumns.add(
SortColumnDetails(
name: 'name',
sortDirection: DataGridSortDirection.ascending,
),
);
_employeeDataSource.sort();
Enable both programmatic and UI-based filtering:
SfDataGrid(
source: _employeeDataSource,
allowFiltering: true,
columns: _columns,
onFilterChanging: (DataGridFilterChangeDetails details) {
// Optional: validate before applying filter
return true;
},
onFilterChanged: (DataGridFilterChangeDetails details) {
// Optional: handle post-filter notification
print('Filtered column: ${details.column.columnName}');
},
)
Add programmatic filters:
// Add single condition
_employeeDataSource.addFilter(
'salary',
FilterCondition(
type: FilterType.greaterThanOrEqual,
value: 50000,
),
);
// Add multiple conditions (AND operator)
_employeeDataSource.addFilter(
'salary',
FilterCondition(
value: 100000,
type: FilterType.lessThanOrEqual,
filterOperator: FilterOperator.and,
),
);
// Clear filters
_employeeDataSource.clearFilters('salary');
Implement hierarchical data grouping with expand/collapse functionality:
// In initState
_employeeDataSource.addColumnGroup(
ColumnGroup(name: 'city', sortGroupRows: true),
);
// In widget build
SfDataGrid(
source: _employeeDataSource,
controller: _dataGridController,
allowExpandCollapseGroup: true,
autoExpandGroups: false,
groupCaptionTitleFormat: '{ColumnName}: {Key} ({ItemsCount} records)',
groupExpanded: (DataGridGroupChangedDetails group) {
print('Group expanded: ${group.key}');
},
groupCollapsed: (DataGridGroupChangedDetails group) {
print('Group collapsed: ${group.key}');
},
columns: _columns,
)
Programmatic expand/collapse:
// Expand all groups
_dataGridController.expandAllGroup();
// Collapse groups at specific level
_dataGridController.collapseGroupsAtLevel(1);
| Use Case | Key Features | Reference Files |
|---|---|---|
| Basic data display | Data binding, columns | getting-started.md, column-types.md |
| Editable grid | Cell editing, validation | editing.md, data-binding.md |
| Sortable/filterable table | Sorting, filtering | sorting.md, filtering.md |
| Grouped data with totals | Grouping, summaries | grouping.md, summaries.md |
| Large dataset | Paging, Load More | paging.md, load-more.md |
| Data export | Excel/PDF export | export-to-excel.md, export-to-pdf.md |
| Responsive layout | Column sizing, scrolling | column-sizing.md, scrolling.md |
| Custom cell layouts | Templates, styling | styles.md, conditional-styling.md |
DataGrid not showing data:
source is set with a valid DataGridSourcecolumns are definedbuildDataGridRows() is called in DataGridSource constructorEditing not working:
allowEditing=truenavigationMode to GridNavigationMode.cellselectionMode to Single or MultipleallowEditing propertySorting not working:
allowSorting=true on the SfDataGridGridColumn.allowSorting is not false)compare() method is implemented correctly in DataGridSource if using custom sortingperformSorting() in DataGridSourceFiltering not working:
allowFiltering=true on the SfDataGridGridColumn.allowFiltering is not false)addFilter() matches exact GridColumn.columnNameFilterCondition.type is appropriate for the data typeeffectiveRows returns filtered results; use clearFilters() to reset all filtersGrouping not showing:
addColumnGroup() is called before building the gridColumnGroup.name exactly matches a GridColumn.columnNameallowExpandCollapseGroup=true to show expand/collapse UIDataGridController with expandAllGroup() to verify grouping is workingMulti-Column Sorting not working:
allowMultiColumnSorting=true on the SfDataGridsortedColumns list to verify multiple sort entries existsort() after modifying sortedColumns programmaticallyCustom Grouping Logic not applied:
performGrouping() in DataGridSourcereferences/accessibility.md (opens in a new tab)references/column-drag-and-drop.md (opens in a new tab)references/column-resizing.md (opens in a new tab)references/column-sizing.md (opens in a new tab)references/column-types.md (opens in a new tab)references/conditional-styling.md (opens in a new tab)references/data-binding.md (opens in a new tab)references/editing.md (opens in a new tab)references/export-to-excel.md (opens in a new tab)references/export-to-pdf.md (opens in a new tab)references/filtering.md (opens in a new tab)references/footer.md (opens in a new tab)references/freeze-panes.md (opens in a new tab)references/getting-started.md (opens in a new tab)references/grouping.md (opens in a new tab)references/load-more.md (opens in a new tab)references/localization.md (opens in a new tab)references/paging.md (opens in a new tab)references/placeholder.md (opens in a new tab)references/pull-to-refresh.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub syncfusion/boldcreate-plugins --plugin syncfusion-flutter14 skills in this plugin
/syncfusion-flutter-barcode-generatorImplements Syncfusion Flutter Barcode Generator (SfBarcodeGenerator) for generating 1D and 2D barcodes in Flutter apps. Use when working with QR codes, Data Matrix, Code128, EAN, UPC, or other machine-readable barcode formats. This skill covers barcode types, customization, sizing, text display, and integration into product labels, ticketing, or inventory systems./syncfusion-flutter-calendar-datepickerImplements Syncfusion Flutter Calendar (SfCalendar) and Date Range Picker (SfDateRangePicker) widgets for date and scheduling UIs in Flutter apps. Use when building appointment calendars, booking systems, date range selectors, or event scheduling interfaces. This skill covers calendar views, recurring events, date navigation, localization, callbacks, and customization./syncfusion-flutter-cartesian-chartsImplements Syncfusion Flutter Cartesian Charts (SfCartesianChart) for a wide range of 2D chart types in Flutter apps. Use when working with line, column, bar, area, spline, scatter, bubble, financial, stacked, or histogram charts. This skill covers axis types (NumericAxis, CategoryAxis, DateTimeAxis), zoom and pan, tooltip, trackball, legend, annotations, technical indicators, trendlines, and chart export./syncfusion-flutter-chatImplements Syncfusion Flutter Chat (SfChat) and AI AssistView (SfAIAssistView) widgets for conversational interfaces in Flutter apps. Use when building chat UIs, AI chatbot interfaces, or messaging screens with support for message bubbles, composers, and action buttons. This skill covers conversation area customization, placeholder screens, theming, RTL support, and AI assistant integration./syncfusion-flutter-circular-chartsImplements Syncfusion Flutter Circular Charts (SfCircularChart) for pie, doughnut, and radial bar data visualizations in Flutter. Use when working with PieSeries, DoughnutSeries, or RadialBarSeries using the syncfusion_flutter_charts package. This skill covers chart setup, data labels, legends, tooltips, selection, annotations, gradients, animation, accessibility, and chart export./syncfusion-flutter-funnel-chartsImplements Syncfusion Flutter Funnel Chart (SfFunnelChart) for proportional and stage-based data visualization in Flutter apps. Use when working with conversion funnels, sales pipelines, or process-stage visualizations. This skill covers series configuration, segment exploding, gap ratio, data labels, legends, tooltips, and customization.