Using using ^19.3.45, on chrome-windows using leftClick+drag, xScroll doesn't work anymore

When the datagrid has many columns, on mac user can use horizontal scroll using mouse or trackpad dragging to right or left.

On windows, using ^19.2.44-beta.1, user can use leftClick+drag to x scroll, but using ^19.3.45, that scroll type doesn't work anymore.

It's a bug or there's some new parameter to do that?

Thanks in advance

Peter


5 Replies

SR Sangeetha Raju Syncfusion Team October 20, 2021 06:56 AM UTC

Hi Pietro Beccegato,


Thank you for contacting Syncfusion support.


The reported issue is the breaking changes from the flutter framework itself during 2.5 version update.


Breaking changes: https://flutter.dev/docs/release/breaking-changes/default-scroll-behavior-drag


You can overcome this issue by adding ScrollConfiguration as parent to the SfDataGrid. Please refer the following code snippet.

@override

  Widget build(BuildContext context) {

    return Scaffold(

        body: ScrollConfiguration(

            behavior: ScrollConfiguration.of(context).copyWith(dragDevices: {

              PointerDeviceKind.touch,

              PointerDeviceKind.mouse,

            }),

            child: SfDataGrid(

                source: _employeeDataSource,

                showCheckboxColumn: true,

                selectionMode: SelectionMode.multiple,

                columns: [

                  GridColumn(

                      columnName: 'id',

                      label: Container(

                          padding: const EdgeInsets.symmetric(horizontal: 16.0),

                          alignment: Alignment.centerRight,

                          child: const Text(

                            'ID',

                            overflow: TextOverflow.ellipsis,

                          ))),

                  GridColumn(

                      columnName: 'name',

                      label: Container(

                          padding: const EdgeInsets.symmetric(horizontal: 16.0),

                          alignment: Alignment.centerLeft,

                          child: const Text(

                            'Name',

                            overflow: TextOverflow.ellipsis,

                          ))),

                  GridColumn(

                      columnName: 'designation',

                      label: Container(

                          padding: const EdgeInsets.symmetric(horizontal: 16.0),

                          alignment: Alignment.centerLeft,

                          child: const Text(

                            'Designation',

                            overflow: TextOverflow.ellipsis,

                          ))),

                  GridColumn(

                      columnName: 'salary',

                      label: Container(

                          padding: const EdgeInsets.symmetric(horizontal: 16.0),

                          alignment: Alignment.centerRight,

                          child: const Text(

                            'Salary',

                            overflow: TextOverflow.ellipsis,

                          )))

                ])));

  }


We have prepared the sample for your reference. Please find the sample from the following link.


Sample link: https://www.syncfusion.com/downloads/support/forum/169769/ze/main1318479174


We hope this information is useful to you. Please let us know if you would require any further assistance.


Regards,

Sangeetha Raju




PB Pietro Beccegato October 20, 2021 07:23 AM UTC

Many many thanks.

With "ScrollConfiguration(....." works perfectly.

Regards

Peter



SR Sangeetha Raju Syncfusion Team October 20, 2021 07:44 AM UTC

Hi Pietro Beccegato, 
 
Thank you for the update. 
  
We are glad to know that the reported problem has been resolved at your end. Please let us know if you need further assistance. As always, we are happy to help you out.  
 
Regards, 
Sangeetha Raju. 



DO David OGUNDEPO January 17, 2023 10:41 AM UTC

Hello Raju, can I use your assistance with the Datagrid widget?



SP Sangavi Periyannan Syncfusion Team January 17, 2023 12:49 PM UTC

David,

Please include more details about your query.  This would be helpful for us to serve you.


Loader.
Up arrow icon