Welcome to the .NET MAUI feedback portal. We’re happy you’re here! If you have feedback on how to improve the .NET MAUI, we’d love to hear it!

  • Check out the features or bugs others have reported and vote on your favorites. Feedback will be prioritized based on popularity.
  • If you have feedback that’s not listed yet, submit your own.

Thanks for joining our community and helping improve Syncfusion products!

2
Votes

Hi,

I was wondering if it would be possible to add a new column sizing method that combines the Auto and LastColumnFill methods.

The reason we want this is that our grid's columns can greatly vary in size. Sometimes, our grid will be smaller than the full width of the screen. Other times, it will be much larger. And we always want the to take the screen's full width. 

The way we could achieve this currently is by setting the last column's ColumnWidthMode to LastColumnFill. However, if the grid is bigger than the screen, then the column's width will default to the SfDataGrid.DefaultColumnWidth parameter, as described in the documentation. Since we don't know the size we would need the last column to be, we can't give a value to DefaultColumnWidth.

In short, what we would like is that if the grid's columns are smaller than the width of the screen, then we resize the last column to fit the rest. And if the columns are bigger than the screen, then the last column's size will be dependent on the column's content.

In Xamarin.Forms, the way we used to achieve this is by setting the last column's 

ColumnWidthMode to Auto by default, and then setting it to 
LastColumnFill if the columns' total size is too small during the View.CollectionChanged event. This doesn't seem to work anymore in Maui, because since the columns' ActualWidth aren't set anymore in this event, we can't calculate the current size of the grid.