GrapeCity MultiRow Windows Forms Documentation
CurrentCell Property


Gets or sets the currently active cell.
Syntax
<BrowsableAttribute(False)>
<FeatureAttribute(Name="CurrentCell", Version="v5.0")>
<DesignerSerializationVisibilityAttribute(DesignerSerializationVisibility.Hidden)>
Public Property CurrentCell As Cell
Dim instance As GcMultiRow
Dim value As Cell
 
instance.CurrentCell = value
 
value = instance.CurrentCell
[Browsable(false)]
[Feature(Name="CurrentCell", Version="v5.0")]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public Cell CurrentCell {get; set;}

Property Value

A Cell that represents the current cell, or a null reference (Nothing in Visual Basic) if there is no current cell. The default is the cell whose Cell.RowIndex and Cell.CellIndex are 0 or a null reference (Nothing in Visual Basic) if there are no cells in the control.
Exceptions
ExceptionDescription
System.ArgumentException

The specified Cell does not belong to the current GcMultiRow control.

-or-

The specified Cell is unselectable, invisible, or in a row which is invisible.

-or-

The specified Cell is not in a Row.

System.InvalidOperationException

The ViewMode is ViewMode.Display.

-or-

The ViewMode is ViewMode.ListBox.

-or-

The GcMultiRow has no Template.

-or-

The current cell cannot be committed or canceled.

Remarks

When you set a cell as the current cell, it scrolls into view if it is not currently displayed. The current cell cannot be a header cell, a disabled cell, or a cell in a hidden row.

You can set this property to a null reference (Nothing in Visual Basic) to temporarily remove the focus rectangle, but when the control receives focus and the value of this property is a null reference (Nothing in Visual Basic), it is automatically set to the FirstDisplayedCellPosition.

When you change the value of this property, the SelectionChanged event occurs before the CurrentCellChanged event. Any SelectionChanged event handler accessing the CurrentCell property at this time gets its previous value.

When you change a new Template or set a data source with the DataSource property, the current cell is set to the FirstDisplayedCellPosition automatically.

When the ViewMode property is ViewMode.ListBox, the CurrentCell is a null reference (Nothing in Visual Basic), but the CurrentRow changes to the new row you select.

Getting this property instantiates the current cell. The current cell is not instantiated if you use the CurrentCellPosition property to change the current cell.

Requirements

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

See Also

Reference

GcMultiRow Class
GcMultiRow Members
CurrentCellPosition Property

 

 


Copyright © GrapeCity, inc. All rights reserved.