You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When filtering to remove rows in the grid and then selecting 'Select All', not all groups reappear in the grid.
Steps to reproduce
group a column
filter a column so that it removes rows
filter that same one and use 'Select All'
Code sample
Code sample
import'package:flutter/material.dart';
import'package:syncfusion_flutter_datagrid/datagrid.dart';
voidmain() {
runApp(MyApp());
}
/// The application that contains datagrid on it.classMyAppextendsStatelessWidget {
@overrideWidgetbuild(BuildContext context) {
returnMaterialApp(
title:'Syncfusion DataGrid Demo',
theme:ThemeData(useMaterial3:false),
home:MyHomePage(),
);
}
}
/// The home page of the application which hosts the datagrid.classMyHomePageextendsStatefulWidget {
/// Creates the home page.MyHomePage({Key? key}) :super(key: key);
@override_MyHomePageStatecreateState() =>_MyHomePageState();
}
class_MyHomePageStateextendsState<MyHomePage> {
List<Employee> employees =<Employee>[];
lateEmployeeDataSource employeeDataSource;
@overridevoidinitState() {
super.initState();
employees =getEmployeeData();
employeeDataSource =EmployeeDataSource(employeeData: employees);
employeeDataSource
.addColumnGroup(ColumnGroup(name:'id', sortGroupRows:true));
}
@overrideWidgetbuild(BuildContext context) {
returnScaffold(
appBar:AppBar(
title:constText('Syncfusion Flutter DataGrid'),
),
body:SfDataGrid(
key:ValueKey('grid'),
source: employeeDataSource,
columnWidthMode:ColumnWidthMode.fill,
allowSorting:true,
allowFiltering:true,
allowExpandCollapseGroup:true,
autoExpandGroups:false,
columns:<GridColumn>[
GridColumn(
columnName:'id',
label:Container(
padding:EdgeInsets.all(16.0),
alignment:Alignment.center,
child:Text(
'ID',
),
),
),
GridColumn(
columnName:'name',
label:Container(
padding:EdgeInsets.all(8.0),
alignment:Alignment.center,
child:Text('Name'),
),
),
GridColumn(
columnName:'designation',
label:Container(
padding:EdgeInsets.all(8.0),
alignment:Alignment.center,
child:Text(
'Designation',
overflow:TextOverflow.ellipsis,
))),
GridColumn(
columnName:'salary',
label:Container(
padding:EdgeInsets.all(8.0),
alignment:Alignment.center,
child:Text('Salary'))),
],
),
);
}
List<Employee> getEmployeeData() {
return [
Employee(10001, 'James', 'Project Lead', 20000),
Employee(10002, 'Kathryn', 'Manager', 30000),
Employee(10003, 'Lara', 'Developer', 15000),
Employee(10004, 'Michael', 'Designer', 15000),
Employee(10005, 'Martin', 'Developer', 15000),
Employee(10006, 'Newberry', 'Developer', 15000),
Employee(10007, 'Balnc', 'Developer', 15000),
Employee(10008, 'Perry', 'Developer', 15000),
Employee(10009, 'Gable', 'Developer', 15000),
Employee(10010, 'Grimes', 'Developer', 15000)
];
}
}
/// Custom business object class which contains properties to hold the detailed/// information about the employee which will be rendered in datagrid.classEmployee {
/// Creates the employee class with required details.Employee(this.id, this.name, this.designation, this.salary);
/// Id of an employee.finalint id;
/// Name of an employee.finalString name;
/// Designation of an employee.finalString designation;
/// Salary of an employee.finalint salary;
}
/// An object to set the employee collection data source to the datagrid. This/// is used to map the employee data to the datagrid widget.classEmployeeDataSourceextendsDataGridSource {
/// Creates the employee data source class with required details.EmployeeDataSource({requiredList<Employee> employeeData}) {
_employeeData = employeeData
.map<DataGridRow>((e) =>DataGridRow(cells: [
DataGridCell<int>(columnName:'id', value: e.id),
DataGridCell<String>(columnName:'name', value: e.name),
DataGridCell<String>(
columnName:'designation', value: e.designation),
DataGridCell<int>(columnName:'salary', value: e.salary),
]))
.toList();
}
List<DataGridRow> _employeeData = [];
@overrideList<DataGridRow> get rows => _employeeData;
@overrideWidget?buildGroupCaptionCellWidget(
RowColumnIndex rowColumnIndex, String summaryValue) {
returnAlign(
alignment:Alignment.centerLeft,
child:Text(summaryValue),
);
}
@overrideDataGridRowAdapterbuildRow(DataGridRow row) {
returnDataGridRowAdapter(
cells: row.getCells().map<Widget>((e) {
returnContainer(
alignment:Alignment.center,
padding:EdgeInsets.all(8.0),
child:Text(e.value.toString()),
);
}).toList());
}
}
Screenshots or Video
Screenshots / Video demonstrationgroups_filter_bug.mp4
Stack Traces
Stack Traces
No stack trace
On which target platforms have you observed this bug?
Windows
Flutter Doctor output
Doctor output
[√] Flutter (Channel stable, 3.24.4, on Microsoft Windows [Version 10.0.26100.2605], locale en-CA) • Flutter version 3.24.4 on channel stable at C:\flutter • Upstream repository https://github.com/flutter/flutter.git • Framework revision 603104015d (3 months ago), 2024-10-24 08:01:25 -0700 • Engine revision db49896cf2 • Dart version 3.5.4 • DevTools version 2.37.3[√] Windows Version (Installed version of Windows is version 10 or higher)[√] Android toolchain - develop for Android devices (Android SDK version 35.0.0) • Platform android-35, build-tools 35.0.0 • Java version OpenJDK Runtime Environment (build 17.0.10+0--11609105) • All Android licenses accepted.[√] Chrome - develop for the web • Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe[√] Visual Studio - develop Windows apps (Visual Studio Professional 2022 17.10.4) • Visual Studio Professional 2022 version 17.10.35027.167 • Windows 10 SDK version 10.0.22621.0[√] Android Studio (version 2024.1) • Java version OpenJDK Runtime Environment (build 17.0.10+0--11609105)[√] IntelliJ IDEA Community Edition (version 2024.2) • Dart plugin version 242.21829.3[√] VS Code (version 1.96.2) • Flutter extension version 3.102.0[√] Connected device (3 available) • Windows (desktop) • windows • windows-x64 • Microsoft Windows [Version 10.0.26100.2605] • Chrome (web) • chrome • web-javascript • Google Chrome 131.0.6778.205 • Edge (web) • edge • web-javascript • Microsoft Edge 131.0.2903.99[√] Network resources • All expected network resources are available.• No issues found!
The text was updated successfully, but these errors were encountered:
We have checked your query at our end, and we are able to replicate that issue at our end. We have considered this as a bug . We will fix the reported issue and include the changes in our upcoming weekly patch release, which is expected to be rolled out on January 28, 2025. We will let you know once released, and we appreciate your patience until then.
Disclaimer: Inclusion of this solution in the weekly release may change due to other factors including but not limited to QA checks and works reprioritization.
We are glad to inform you that the reported problem has been resolved on our end. Therefore, kindly update SfDataGrid to the latest version(28.2.3).
Root cause : When the filter is removed using the "Select All" option in the checkbox filter, we simply call the updateDataSource method. However, when grouping is applied, it is necessary to clear the display elements. Based on this clearing, grouping is performed with the updated effective rows. The issue occurs because this clearing step is missing.
If you have any further queries, please don't hesitate to reach out. We are more than happy to assist you.
We suspect that the reported issue has been resolved at your end. Hence, we are closing this issue. If you need any further assistance, please reopen this. We are always happy to help.
Bug description
When filtering to remove rows in the grid and then selecting 'Select All', not all groups reappear in the grid.
Steps to reproduce
Code sample
Code sample
Screenshots or Video
Screenshots / Video demonstration
groups_filter_bug.mp4
Stack Traces
Stack Traces
No stack trace
On which target platforms have you observed this bug?
Windows
Flutter Doctor output
Doctor output
The text was updated successfully, but these errors were encountered: