GrapeCity.Win.MultiRow Namespace > GcMultiRow Class : FreezeLeftCellIndex Property |
<SRCategoryAttribute("Behavior")> <SRDescriptionAttribute("Indicates the index of the cell whose right edge is the location of the left freeze line.")> <DefaultValueAttribute()> <RefreshPropertiesAttribute(RefreshProperties.All)> Public Property FreezeLeftCellIndex As Integer
Dim instance As GcMultiRow Dim value As Integer instance.FreezeLeftCellIndex = value value = instance.FreezeLeftCellIndex
[SRCategory("Behavior")] [SRDescription("Indicates the index of the cell whose right edge is the location of the left freeze line.")] [DefaultValue()] [RefreshProperties(RefreshProperties.All)] public int FreezeLeftCellIndex {get; set;}
Exception | Description |
---|---|
System.ArgumentOutOfRangeException | The specified value is less than -1. |
If this property's value is not -1, the area from the left section edge to the right edge of the specific cell is frozen.
If this property's value is equal to or greater than the row cell count, this property does not take effect, and the control does not throw an exception. If changing the template causes the cell count to increase or this property's value decreases to a valid value, this property takes effect.
If the area width from the left edge of the section to the right edge of the specific cell plus the width of the area from the right edge of the right frozen cell to the right edge of the section is greater than the control's width, the whole control is frozen. This situation should be avoided.
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
Target Platforms: 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