Show summation in groupCaptionTitleFormat

In flutter, Sfdatagrid i want to show the summation of particular column in 

groupCaptionTitleFormat.


3 Replies 1 reply marked as answer

AP Abinesh Palanisamy Syncfusion Team November 13, 2024 09:51 AM UTC

Hi Umang,

 As of now, the DataGrid does not have support for the caption summary row within grouping . We have already considered your request as a feature. We will implement this feature in any of our upcoming releases. At the planning stage for every release cycle, we review all open features and identify features for implementation based on specific parameters including product vision, technological feasibility, and customer interest. We appreciate your patience and understanding until then. You can follow up with the below feedback for further details,

 

Feedback link: 53098

 

Regards,

Abinesh P 



Marked as answer

UM Umang replied to Abinesh Palanisamy November 13, 2024 10:38 AM UTC

hi  Abinesh ,

Thank you for the quick response. 
Also i have one small query is it possible to get the current sfdatagrid data as list on tap of button. I need the data which is showin in sfdatagrid after filtering and sorting so how should i do that?



AP Abinesh Palanisamy Syncfusion Team November 13, 2024 01:14 PM UTC

Hi Umang,

In SfDataGrid, you can fetch the rows displayed in the UI, even when filtering or sorting is applied, by using DataGridSource.effectiveRows. Below is a code snippet for reference.

Code snippets:

 @override

  Widget build(BuildContext context) {

    return Scaffold(

      appBar: AppBar(

        title: const Text('Syncfusion Flutter DataGrid'),

      ),

      body: Column(

        children: [

          TextButton(

              onPressed: () {

                // Fetch the rows displayed in the UI.

                List<DataGridRow> currentRows =

                    employeeDataSource.effectiveRows;

              },

              child: const Text('Get RowData')),

          Expanded(

            child: SfDataGrid(

              source: employeeDataSource,

              allowFiltering: true,

              allowSorting: true,

              columnWidthMode: ColumnWidthMode.fill,

              columns: <GridColumn>[

                GridColumn(

                    columnName: 'id',

                    label: Container(

                        padding: const EdgeInsets.all(16.0),

                        alignment: Alignment.center,

                        child: const Text(

                          'ID',

                        ))),

                GridColumn(

                    columnName: 'name',

                    label: Container(

                        padding: const EdgeInsets.all(8.0),

                        alignment: Alignment.center,

                        child: const Text('Name'))),

                GridColumn(

                    columnName: 'designation',

                    label: Container(

                        padding: const EdgeInsets.all(8.0),

                        alignment: Alignment.center,

                        child: const Text(

                          'Designation',

                          overflow: TextOverflow.ellipsis,

                        ))),

                GridColumn(

                    columnName: 'salary',

                    label: Container(

                        padding: const EdgeInsets.all(8.0),

                        alignment: Alignment.center,

                        child: const Text('Salary'))),

              ],

            ),

          ),

        ],

      ),

    );

  }


Regards,

Abinesh P


Loader.
Up arrow icon