Hello All,
I am a very new user to Ultragrid.
I am trying to resize a clicked column to show its whole content by resizing its row and its width. I am using vbnet2005.
For example, a columns content is 1000 characters and its viewable content is truncated because the grid is not big enough. When the user clicks that column, it needs to resize the row its on and the column width to show its content on multiple lines without resizing the font or the other rows. How can I achive this?
Thank you
I have found no documentation that could help me achive this!
Hello,
When a user selects a column you want to resize it? Is this what you are after?
Handle the AfterSelectChange event of the grid and check the e.Type.Name == "ColumnHeader"
If so then autosize that column:
' column selectedDim col As UltraGridColumn = Me.ultraGrid1.Selected.Columns(0).ColumnDim width As Integer = col.CalculateAutoResizeWidth(Infragistics.Win.UltraWinGrid.PerformAutoSizeType.AllRowsInBand, True)col.Width = width' or you can do this:'col.PerformAutoResize(PerformAutoSizeType.AllRowsInBand, true)
Don't forget to change the HeaderClickAction property so the user can select a column:
ultraGrid1.DisplayLayout.Override.HeaderClickAction = Infragistics.Win.UltraWinGrid.HeaderClickAction.Select
If you wanted to resize all the columns you can do the following:
ultraGrid1.DisplayLayout.PerformAutoResizeColumns(false, Infragistics.Win.UltraWinGrid.PerformAutoSizeType.AllRowsInBand, true)