Resizes the row based on its contents. This method does nothing when the UltraGridOverride.RowSizing resolves to Synchronized which it does by default. Set it to a value other than Synchronized to have this method perform as expected.
Imports Infragistics.Shared Imports Infragistics.Win Imports Infragistics.Win.UltraWinGrid Private Sub UltraGrid1_InitializeLayout(ByVal sender As Object, ByVal e As Infragistics.Win.UltraWinGrid.InitializeLayoutEventArgs) Handles UltraGrid1.InitializeLayout ' PerformAutoSize is honored only for RowSizing of Free or AutoFree. ' Me.UltraGrid1.DisplayLayout.Override.RowSizing = RowSizing.Free Me.UltraGrid1.DisplayLayout.Bands(0).Columns(0).CellMultiLine = DefaultableBoolean.True End Sub Private Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles button1.Click Me.UltraGrid1.Rows(0).Cells(0).Value = "Long long" & vbCrLf & "multiline text" ' When the value of a cell is changed that qill require the height of the ' row to be adjusted, call PerformAutoSize to. ' Me.UltraGrid1.Rows(0).PerformAutoSize() End Sub
using Infragistics.Shared; using Infragistics.Win; using Infragistics.Win.UltraWinGrid; using System.Diagnostics; private void ultraGrid1_InitializeLayout(object sender, Infragistics.Win.UltraWinGrid.InitializeLayoutEventArgs e) { // PerformAutoSize is honored only for RowSizing of Free or AutoFree and AutoFixed. // this.ultraGrid1.DisplayLayout.Override.RowSizing = RowSizing.Free; this.ultraGrid1.DisplayLayout.Bands[0].Columns[0].CellMultiLine = DefaultableBoolean.True; } private void button1_Click(object sender, System.EventArgs e) { this.ultraGrid1.Rows[0].Cells[0].Value = "Long long\nmultiline text"; // When the value of a cell is changed that qill require the height of the // row to be adjusted, call PerformAutoSize to. // this.ultraGrid1.Rows[0].PerformAutoSize( ); }
Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2