syncfusion / flutter-widgets

Syncfusion Flutter widgets libraries include high quality UI widgets and file-format packages to help you create rich, high-quality applications for iOS, Android, and web from a single code base.
1.46k stars 680 forks source link

[DataGrid] option to add Footer #205

Closed qbait closed 3 years ago

qbait commented 3 years ago

I need the possibility to add Footer to Grid. I guess that's the common use case. Could you add this option, guys?

RenugaSadagoban98 commented 3 years ago

Hi @qbait ,

Greetings from syncfusion.

We are not clear with your requirement. Can you please provide the following requested details?

• Do you want to display the sticky footer for datagrid or do you want to last few rows to be sticky? If yes, we have provided the footerFrozenRowsCount property. This will enable you to freeze some rows at bottom. Footer frozen rows

image

Unbound sticky footer

image

• Did you want to display the summary information at bottom(footer) like the following image?

image

Please provide the above details, It will be helpful for us to check on it and provide you the solution at the earliest.

Regards, Renuga devi S

qbait commented 3 years ago

I don't want to add a sticky footer. I would like to have the possibility to add a footer that is visible after scrolling to the bottom of the grid.

Best, Jakub

RenugaSadagoban98 commented 3 years ago

Hi @qbait,

We regard for inconvenient.

Based on the provided information, we couldn’t understand your requirement clearly. So please provide more details about your footer query or provide any use case for a footer with the image. It will help us to understand your requirement clearly and provide a prompt solution at the earliest.

Regards, Renuga devi S

qbait commented 3 years ago

Here is my use case

Screenshot 2021-05-03 at 19 14 20

It should work like a regular footer, after scrolling to the end of the grid or having no results, it should be the last row.

I see that more people need that kind of functionality https://github.com/syncfusion/flutter-widgets/issues/84

RenugaSadagoban98 commented 3 years ago

Hi @qbait ,

Thanks for your update.

We have analyzed your requirement. Please clarify the following details,

• SfDataGrid does have support to load the data lazily i.e load more rows to the datagrid when vertical scrolling is reached at the bottom of datagrid. Please refer to the following ug document link, UG link: https://help.syncfusion.com/flutter/datagrid/load-more#load-more-button

Screenshot

image

• Also, we are analyzing the possibility to provide the support to show the widget when the datagrid has empty rows. We will get back to you on May 6th, 2021.

We appreciate your patience until then.

Regards, Renuga devi S

qbait commented 3 years ago

@RenugaSadagoban98 workaround using loadMoreViewBuilder doesn't work.

I've added to my SfDataGrid

        loadMoreViewBuilder: (BuildContext context, LoadMoreRows loadMoreRows) {
          return FutureBuilder<String>(
            builder: (context, snapShot) {
              return Container(
                height: 64,
                alignment: Alignment.center,
                padding: EdgeInsets.all(12),
                color: AppColors.white,
                child: Text('Sample Footer'),
              );
            },
          );
        },

However, there are 2 major issues with it:

  1. it hides my last row 2021-05-04 18 28 05

  2. it doesn't work when filtering grid, possibly because the keyboard is visible or scroll is not there 2021-05-04 18 27 32

Footer seems to be a pretty common use case, why you are trying to avoid implementing it?

RenugaSadagoban98 commented 3 years ago

Hi @qbait ,

Thanks for your update.

Currently, we are analyzing your requirement. We will validate and update you with the details by tomorrow. We appreciate your patience until then.

Regards, Renuga devi S

RenugaSadagoban98 commented 3 years ago

Hi @qbait ,
Thanks for your patience.

We have considered your requirement as a feature. We will provide the support to show the additional row (footer view) at the bottom i.e. after the last row. So, you can view this footer when you scroll down to the last row. Also if you have fewer rows in views, the footer row will be shown after the last row.

Also, we will provide the option to customize the height of the footer view. Can you please confirm that the above behaviors will satisfy your requirement?

Regards, Renuga devi S

qbait commented 3 years ago

Yes, sounds great! BTW analogical option for the header would be welcome as well :)

RenugaSadagoban98 commented 3 years ago

Hi @qbait,

We are not clear about your requirement with analogical option for the header. Please provide more details about your requirement. It will be helpful for us to provide a prompt solution at the earliest.

Regards, Renuga devi S

qbait commented 3 years ago

@RenugaSadagoban98 it was just a suggestion, feel free to carry on only with the footer if you don't find the header useful.

RenugaSadagoban98 commented 3 years ago

Hi @qbait , Thanks for your update.

In our previous update, we have requested more details about your requirement. If you could provide more details about your requirement in the header, we will look onto that and provide you the details. However, as we promised earlier, we have considered your request as a feature. This feature will be implemented in our any of our upcoming release.

Please refer to the below feedback link for further follow up, Feedback link: https://www.syncfusion.com/feedback/25060/support-to-show-footer-view-at-bottom-of-the-datagrid

We appreciate your patience until then. For further assistance, you can follow the feature request.

Regards, Renuga devi S