RowSpacingAfter プロパティを使用すると、バンドまたはグリッド内の行の後の間隔を指定できます。行間にはグリッドの背景領域が表示されるため、背景に画像やテクスチャを指定した場合に有効です。行の前の間隔を指定するには、RowSpacingBefore プロパティを使用します。
グリッドまたはバンド内のすべての行の行間隔を指定するには、Override の RowSpacingAfter プロパティと RowSpacingBefore プロパティを使用します。
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 ' Set the RowSpacingBefore and RowSpacingAfter grid-wide by using the ' layout's override. This applies to non-group-by rows only. Me.UltraGrid1.DisplayLayout.Override.RowSpacingAfter = 0 Me.UltraGrid1.DisplayLayout.Override.RowSpacingBefore = 5 ' For group-by rows, use the GroupByRowSpacingAfter and ' GroupByRowSpacingBefore properties. Me.UltraGrid1.DisplayLayout.Override.GroupByRowSpacingAfter = 2 Me.UltraGrid1.DisplayLayout.Override.GroupByRowSpacingBefore = 2 ' You can override that grid-wide setting for a particular band by setting it ' on the override of that band. Me.UltraGrid1.DisplayLayout.Bands(1).Override.RowSpacingAfter = 5 Me.UltraGrid1.DisplayLayout.Bands(1).Override.RowSpacingBefore = 0 ' You can also have row spacing after and before individual rows. This ' applies to both group-by rows and non-group-by rows depending upon what the ' row is. Me.UltraGrid1.Rows(0).RowSpacingAfter = 20 Me.UltraGrid1.Rows(0).RowSpacingBefore = 20 End Sub
using Infragistics.Shared; using Infragistics.Win; using Infragistics.Win.UltraWinGrid; using System.Diagnostics; private void button1_Click(object sender, System.EventArgs e) { // Set the RowSpacingBefore and RowSpacingAfter grid-wide by using the // layout's override. This applies to non-group-by rows only. this.ultraGrid1.DisplayLayout.Override.RowSpacingAfter = 0; this.ultraGrid1.DisplayLayout.Override.RowSpacingBefore = 5; // For group-by rows, use the GroupByRowSpacingAfter and // GroupByRowSpacingBefore properties. this.ultraGrid1.DisplayLayout.Override.GroupByRowSpacingAfter = 2; this.ultraGrid1.DisplayLayout.Override.GroupByRowSpacingBefore = 2; // You can override that grid-wide setting for a particular band by setting it // on the override of that band. this.ultraGrid1.DisplayLayout.Bands[1].Override.RowSpacingAfter = 5; this.ultraGrid1.DisplayLayout.Bands[1].Override.RowSpacingBefore = 0; // You can also have row spacing after and before individual rows. This // applies to both group-by rows and non-group-by rows depending upon what the // row is. this.ultraGrid1.Rows[0].RowSpacingAfter = 20; this.ultraGrid1.Rows[0].RowSpacingBefore = 20; }