Imports Infragistics.Shared Imports Infragistics.Win Imports Infragistics.Win.UltraWinGrid Private Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles button1.Click Dim columns As ColumnsCollection = Me.UltraGrid1.DisplayLayout.Bands(0).Columns Dim i As Integer For i = 0 To columns.Count - 1 Dim column As UltraGridColumn = columns(i) Debug.WriteLine(column.Header.Caption & " column cells are sized " & column.CellSizeResolved.ToString() & " while headers are sized " & column.Header.SizeResolved.ToString()) Next End Sub
using Infragistics.Shared; using Infragistics.Win; using Infragistics.Win.UltraWinGrid; using System.Diagnostics; private void button1_Click(object sender, System.EventArgs e) { ColumnsCollection columns = this.ultraGrid1.DisplayLayout.Bands[0].Columns; for ( int i = 0; i < columns.Count; i++ ) { UltraGridColumn column = columns[i]; Debug.WriteLine( column.Header.Caption + " column cells are sized " + column.CellSizeResolved + " while headers are sized " + column.Header.SizeResolved ); } }