ComponentOne True DBGrid Pro 8
DestinationRow Property

DestinationRow Property

Returns destination row bookmark during cell movement.

Syntax

object.DestinationRow

Remarks

Read-only at run time. Not available at design time.

This property is used when moving from one cell to another in the grid.  It indicates which grid row will be the destination of the movement. The value returned is the bookmark of the row containing the destination cell. If you click outside any visible row (for example, on the header), DestinationRow returns Null. If you click the AddNew row, DestinationRow returns "" (empty string).

This property is available only during those events related to cell movement:  AfterColEdit, AfterColUpdate, BeforeColUpdate, BeforeRowColChange, ButtonClick, Click, DblClick, FootClick, GroupHeadClick, HeadClick, MouseDown, MouseUp. Any attempt to access the DestinationRow property outside of these events results in a trappable error ("Property not available in this context").

The property can only be used if the movement is initiated interactively by the user, via the keyboard or mouse. The property is not available when movement is initiated programmatically (for example, when using the grid's MoveNext method).

Note

Care must be exercised when using this property, because it is possible to use the value of this property in an event (such as MouseDown) before knowing whether or not the movement will actually succeed. The value returned by this property only indicates what the correct destination row will be if the cell movement is successful

The DestinationRow property does not guarantee that the cell movement will succeed (for example, movement may fail if contents of the current cell are not valid).  In such cases, the DestinationRow property will not reflect the actual destination position (usually the cell position will remain at the previous location).

See Also

TDBGrid Control

 

 


Copyright (c) GrapeCity, inc. All rights reserved.

Product Support Forum  |  Documentation Feedback