public int FreezeLeftCellIndex {get; set;}
Public Property FreezeLeftCellIndex As Integer
プロパティ値
コントロールを左側で固定するセルのインデックスを表す
System.Int32値。既定値は
-1で、左側で固定されないことを意味します。
次のサンプルコードは、このプロパティを使用してMulitRowコントロールの左側のセルを固定する方法を示します。このサンプルコードは、
FreezeLinesプロパティに示されている詳細なコード例の一部を抜粋したものです。
void setLeftFreezeButton_Click(object sender, EventArgs e)
{
// You can use FreezeLeftCellIndex instead of FreezeLeftCellName to indicate which cell will be frozen.
if (string.IsNullOrEmpty(this.gcMultiRow1.FreezeLeftCellName))
{
// Freeze some rows in top of gcMultiRow.
this.gcMultiRow1.FreezeLeftCellName = "textBoxCell1";
// this.gcMultiRow1.FreezeLeftCellIndex = 0;
}
else
{
// Unfreeze rows in top of gcMultiRow.
this.gcMultiRow1.FreezeLeftCellName = string.Empty;
// this.gcMultiRow1.FreezeLeftCellIndex = -1;
}
}
Private Sub setLeftFreezeButton_Click(ByVal sender As Object, ByVal e As EventArgs) Handles setLeftFreezeButton.Click
' You can use FreezeLeftCellIndex instead of FreezeLeftCellName to indicate which cell will be frozen.
If String.IsNullOrEmpty(Me.gcMultiRow1.FreezeLeftCellName) Then
' Freeze some rows in top of gcMultiRow.
' this.gcMultiRow1.FreezeLeftCellIndex = 0;
Me.gcMultiRow1.FreezeLeftCellName = "textBoxCell1"
Else
' Unfreeze rows in top of gcMultiRow.
' this.gcMultiRow1.FreezeLeftCellIndex = -1;
Me.gcMultiRow1.FreezeLeftCellName = String.Empty
End If
End Sub