-
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
[syncfusion_flutter_datagrid]: onQueryRowHeight doesn't correctly adjust the height of the row depend on the content. #2248
Comments
Hi @wartelski , After thoroughly analyzing the sample code and the details you provided, it appears that you have set the width for all columns. Additionally, you are using SfDataGrid.onQueryRowHeight to determine the height of rows based on the cell values. By constraining the column widths, the values in the ID, Name, and Designation columns are being clipped. When using onQueryRowHeight, the height calculation is performed based on all cell values within the rows. Consequently, other column cell values contribute to a certain height, which results in the rowHeight being maintained even when a larger width is set for the button columns. To avoid this issue and achieve the desired UI, you need to increase the width of the other columns, similar to what you have done for the button column. We have included a sample for your reference. Sample: row_height.zip As of now, the DataGrid does not have support to autofit the columns and rows based on size of the widget loaded in cells. 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: 30155 Regards, |
Hello @ashok-kuvaraja Thank you for your response. You saying "other column cell values contribute to a certain height, which results in the rowHeight being maintained even when a larger width is set for the button columns." I found in the docs a property excludeColumns. And even if GridColumn has width: double.nan, I still have an issue making the hight of the row bigger when the content gets bigger.
And I'm not even talking about constraining the column widths, it is just simply responsive issue, on smaller screen it doesn't look right. Defining a bigger width also will not help, because what if I will have 10 buttons in one cell, and in another one just 2 buttons. Here is the project I'm working on, and the data is dynamic. As you can see the 2nd and 5th row is too big for no reason, but the 7th row makes sense. But I guess there is no solution in syncfusion currently. |
Bug description
I need to change the height of the row in case if the content inside of the cell gets bigger.
I found that the best solution for this is to use onQueryRowHeight. But, for some reason, it doesn't work as expected.
Here is an example
without using onQueryRowHeight:
My expectation is:
Thank you.
Steps to reproduce
Code sample
Code sample
Screenshots or Video
Screenshots / Video demonstration
Stack Traces
Stack Traces
On which target platforms have you observed this bug?
Web
Flutter Doctor output
Doctor output
The text was updated successfully, but these errors were encountered: