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