Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flutter Syncfusion DataGridview how to Find Colum Name of Sorted Index. #2157

Open
abdulrehmananwar opened this issue Nov 4, 2024 · 1 comment
Labels
data grid Data grid component waiting for customer response Cannot make further progress until the customer responds.

Comments

@abdulrehmananwar
Copy link

abdulrehmananwar commented Nov 4, 2024

Use case

Retrieve Sorted Column Name
I would like to request a feature that provides the ability to easily retrieve the name of the column selected for sorting in the Syncfusion DataGrid. This would allow developers to dynamically identify which column is being sorted and perform relevant actions based on the sorted column.

Auto-Adjust Column Width on Double-Click
A feature to automatically adjust the width of a column when its resize handle is double-clicked would greatly enhance user experience. This behaviour should dynamically fit the column's width to its content, similar to how spreadsheet applications handle column resizing.

Conditional Column Width Mode Based on Cell Values
It would be beneficial to have an option where ColumnWidthMode.fitByCellValue applies only when cell values are not empty. For columns with blank values, the width should default to ColumnWidthMode.fitByColumnName. This ensures optimal use of space and improves readability by avoiding overly wide columns due to a few non-empty cells while maintaining consistent width for columns with primarily empty values.

Need to Find the Filtered Rows Count
i need to get the count of Filtered Rows. if i get DataGrid Rows Count it still showing me total rows. not length of filtered.

Proposal

image
image
image

@VijayakumarMariappan VijayakumarMariappan added data grid Data grid component open Open labels Nov 5, 2024
@abineshPalanisamy
Copy link

Hi @abdulrehmananwar ,

Query Response
Retrieve Sorted Column Name Please refer to the following Knowledge Base link for a deeper understanding of How to retrieve the details of sorted columns in Flutter DataTable. You can customize the provided code to suit your specific requirements. KB link -  sorted columns
Need to Find the Filtered Rows Count Please refer to the following Knowledge Base link for a deeper understanding of How to display the total row count at the bottom, with active filtering in Flutter DataTable. You can customize the provided code to suit your specific requirements. KB link - Total row count
Conditional Column Width Mode Based on Cell Values To achieve conditional column width based on columnWidthMode for each GridColumn, you can implement a function that determines the appropriate mode for each column based on its cell values. This function will return either ColumnWidthMode.fitByCellValue or ColumnWidthMode.fitByColumnName for each column, depending on the content of the cells. We have included a sample for your reference. Please review it for further details.
Auto-Adjust Column Width on Double-Click We have a workaround to achieve the required behavior using the onCellDoubleTap callback. This callback is triggered when a cell is double-tapped. In this implementation, it checks if the double tap occurred on the header row (the first row, index 0). If so, it sets the width of the column to double.nan, which instructs the grid to automatically adjust the column width to fit the content. Additionally, please note that you need to have focus on the respective header or double-tap directly on the respective header cells. We have included a sample for your reference. Please review it for further details.
  • Samples:

Regards,
Abinesh P

@ashok-kuvaraja ashok-kuvaraja added waiting for customer response Cannot make further progress until the customer responds. and removed open Open labels Nov 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
data grid Data grid component waiting for customer response Cannot make further progress until the customer responds.
Projects
None yet
Development

No branches or pull requests

4 participants