GrapeCity.Win.MultiRow Namespace > GcMultiRow Class : CurrentCell Property |
<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;}
Exception | Description |
---|---|
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- |
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. |
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.
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