-
Notifications
You must be signed in to change notification settings - Fork 803
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
ColumnWidthMode.auto is not working if i set autoExpandGroups: false, #2217
Comments
In SfDataGrid, when grouping is enabled with autoExpandGroups set to false, all the DataGridRows are hidden, and only the caption summary rows are visible in the UI. For calculations like auto and fitByCellValue, we only involve the DataGridRows that are available in the UI, as determined by ColumnWidthCalculationRange.visibleRows. Therefore, this is the expected behavior on our end. To avoid improper UI appearance and calculation issues, you can enable ColumnWidthCalculationRange.allRows. By default, the autofit calculation is performed only on visible rows. However, by setting the SfDataGrid.columnWidthCalculationRange property to ColumnWidthCalculationRange.allRows, the autofit calculation will be performed for all rows, ensuring that all rows in the DataGridRows are involved in the calculation and displayed correctly in the UI. Please note that when ColumnWidthCalculationRange.allRows is enabled, all rows are included in the ColumnWidthMode calculation, which may affect the performance of the DataGrid. We have provided a code snippets for your reference. Please refer to the attached code snippet for more details.
Regards, |
Good to know about that and thanks for clearing the concept. |
Bug description
I have added group feature in my sfdatagrid. So as per the documentation i have set
allowExpandCollapseGroup: true,
After that to stop auto expand group initially i have used
autoExpandGroups: false,
But when i use this property columnWidthMode: ColumnWidthMode.auto, don't work also when I use ColumnWidthMode.fitByCellValue it removes the whole datagrid.
Steps to reproduce
Code sample
Code sample
Screenshots or Video
Screenshots / Video demonstration
Case 1:
When
Showing the full item name.
Case 2:
When
Item name is cropped
Case 3:
When
Whole Table is not showing.
Stack Traces
Stack Traces
On which target platforms have you observed this bug?
Android
Flutter Doctor output
Doctor output
The text was updated successfully, but these errors were encountered: