'Declaration Public Property CurrentItem As Object
'Usage Dim instance As DataGridControl Dim value As Object instance.CurrentItem = value value = instance.CurrentItem
public object CurrentItem {get; set;}
'Declaration Public Property CurrentItem As Object
'Usage Dim instance As DataGridControl Dim value As Object instance.CurrentItem = value value = instance.CurrentItem
public object CurrentItem {get; set;}
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.
<Grid xmlns:xcdg="http://schemas.xceed.com/wpf/xaml/datagrid"> <Grid.Resources> <xcdg:DataGridCollectionViewSource x:Key="cvs_orders" Source="{Binding Source={x:Static Application.Current}, Path=Orders}"/> </Grid.Resources> <DockPanel> <StackPanel Orientation="Horizontal" DockPanel.Dock="Top"> <TextBlock Text="{Binding ElementName=OrdersGrid, Path=CurrentItem[ShipCountry]}"/> <TextBlock Text=" - "/> <TextBlock Text="{Binding ElementName=OrdersGrid, Path=CurrentItem[ShipCity]}"/> </StackPanel> <xcdg:DataGridControl x:Name="OrdersGrid" ItemsSource="{Binding Source={StaticResource cvs_orders}}" DockPanel.Dock="Bottom"> </xcdg:DataGridControl> </DockPanel> </Grid>
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