CellPadding プロパティは、指定したオーバーライドによって制御されるバンドまたはグリッドでセルの端とセルのテキスト間の間隔を決定します。これはセルの内側のマージンと似ています。セル自体を囲むスペースの量を制御したい場合、CellSpacing プロパティを使用します。
CellPadding を -1 の値に設定すると、オーバーライド階層で次に最も高いオブジェクトからの値を使用します。
Imports Infragistics.Shared Imports Infragistics.Win Imports Infragistics.Win.UltraWinGrid Private Sub Button32_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles button32.Click ' Cell padding indicates the amount of space in pixels between the border of the ' cell and it's content. ' Set the CellPadding on the layout's Override to 2. All cells in the UltraGrid will ' have cell padding of 2 pixels. Me.UltraGrid1.DisplayLayout.Override.CellPadding = 4 ' You can override that grid-wide setting for a particular band by setting it on the ' override of that band. Me.UltraGrid1.DisplayLayout.Bands(0).Override.CellPadding = 2 End Sub
using Infragistics.Shared; using Infragistics.Win; using Infragistics.Win.UltraWinGrid; using System.Diagnostics; private void button32_Click(object sender, System.EventArgs e) { // Cell padding indicates the amount of space in pixels between the border of the // cell and it's content. // Set the CellPadding on the layout's Override to 2. All cells in the UltraGrid will // have cell padding of 2 pixels. this.ultraGrid1.DisplayLayout.Override.CellPadding = 4; // You can override that grid-wide setting for a particular band by setting it on the // override of that band. this.ultraGrid1.DisplayLayout.Bands[0].Override.CellPadding = 2; }