You can use the RowSpacingAfter property to specify the space that follows a row in the band or the grid. Space between rows allows the background area of the grid to show through, and can be useful when you have specified a picture or a texture for the background. To control the space that precedes a row, use the RowSpacingBefore property.
To specify the row spacing of all rows in a grid or band, use the Override's RowSpacingAfter and RowSpacingBefore properties.
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; }
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