'宣言 Public ReadOnly Property CellInsets As Infragistics.Win.Layout.Insets
public Infragistics.Win.Layout.Insets CellInsets {get;}
Insets プロパティはセルの周囲のインセットまたは間隔を指定します。
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 ' Turn on the row-layout functionality. Me.UltraGrid1.DisplayLayout.Bands(0).RowLayoutStyle = RowLayoutStyle.ColumnLayout End Sub Private Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles button1.Click Dim column As UltraGridColumn = Me.UltraGrid1.DisplayLayout.Bands(0).Columns(0) ' Set the cell insets to be 20 on left, 10 on top, 20 on right and 10 on bottom. column.RowLayoutColumnInfo.CellInsets.Initialize(20, 10, 20, 10) ' Do the same for the label insets. column.RowLayoutColumnInfo.LabelInsets.Initialize(20, 10, 20, 10) 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) { // Turn on the row-layout functionality. this.ultraGrid1.DisplayLayout.Bands[0].RowLayoutStyle = RowLayoutStyle.ColumnLayout; } private void button1_Click(object sender, System.EventArgs e) { UltraGridColumn column = this.ultraGrid1.DisplayLayout.Bands[0].Columns[0]; // Set the cell insets to be 20 on left, 10 on top, 20 on right and 10 on bottom. column.RowLayoutColumnInfo.CellInsets.Initialize( 20, 10, 20, 10 ); // Do the same for the label insets. column.RowLayoutColumnInfo.LabelInsets.Initialize( 20, 10, 20, 10 ); }