I have a need to have all columns in the grid resized to whatever the max length of the row values is.
Hope that makes sense.
Basically I want each column expanded to whatever row value is the max fro that column.
Like when you manually double-click on the grid columns heading ending edge.
Kinda of like: .DisplayLayout.Rows.ExpandAll(True)
But for columns: .DisplayLayout.Columns.ExpandAll(True)
Is there any way to do that?
Deasun
Hello Deason,
Thank you for contacting Infragistics.
You can use the PerformAutoResizeColumns() method off of the UltraGridBand object to do this.
http://help.infragistics.com/doc/WinForms/2014.1/CLR4.0/?page=Infragistics4.Win.UltraWinGrid.v14.1~Infragistics.Win.UltraWinGrid.UltraGridBand~PerformAutoResizeColumns.html
Perfect. :)
Thanks
Note!
CMD Used:
.DisplayLayout.Bands(0).PerformAutoResizeColumns(False, Infragistics.Win.UltraWinGrid.PerformAutoSizeType.AllRowsInBand)