GrapeCity.Win.MultiRow Namespace > GcMultiRow Class : FreezeRightCellIndex Property |
<SRCategoryAttribute("Behavior")> <DefaultValueAttribute()> <SRDescriptionAttribute("Indicates the index of the cell whose left edge is the location of the right freeze line.")> <RefreshPropertiesAttribute(RefreshProperties.All)> Public Property FreezeRightCellIndex As Integer
Dim instance As GcMultiRow Dim value As Integer instance.FreezeRightCellIndex = value value = instance.FreezeRightCellIndex
[SRCategory("Behavior")] [DefaultValue()] [SRDescription("Indicates the index of the cell whose left edge is the location of the right freeze line.")] [RefreshProperties(RefreshProperties.All)] public int FreezeRightCellIndex {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 edge of the specific cell to the right edge of the section 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 specific cell to the right edge of the section, plus the width of the area from the right edge of the section to the right edge of the left frozen cell, is greater than the control's width, the whole control is frozen. This situation should be avoided.
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
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