'Declaration
Public Property CurrentItem As Object
'Usage
Dim instance As DataGridControl
Dim value As Object
instance.CurrentItem = value
value = instance.CurrentItem
Property Value
A reference to the grid's current master data item. Can be a null reference (Nothing in Visual Basic) if the current item is not a master data item.
Remarks
The CurrentItem and SelectedItem properties may, or may not, be the same data item.
The CurrentItem and SelectedItem/SelectedItems properties must be set to a null reference (Nothing in Visual Basic) in order to reset them when the NavigationBehavior property is set to None.
Example
All examples in this topic assume that the grid is bound to the Orders table of the Northwind database, unless stated otherwise.
The following example demonstrates how to retrieve the value of the ShipCountry and ShipCity properties of the current item and display them in TextBlocks located above the grid. Note that an item in a grid must be current in order for the information to be displayed.
Target Platforms: Windows 11, Windows 10, 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