

'Declaration<TemplatePartAttribute(Name="PART_CellsHost", Type=System.Windows.Controls.Panel)> <ContentPropertyAttribute("Cells")> <StyleTypedPropertyAttribute(Property="FocusVisualStyle", StyleTargetType=System.Windows.Controls.Control)> <XmlLangPropertyAttribute("Language")> <UsableDuringInitializationAttribute(True)> <RuntimeNamePropertyAttribute("Name")> <UidPropertyAttribute("Uid")> <TypeDescriptionProviderAttribute(MS.Internal.ComponentModel.DependencyObjectProvider)> <NameScopePropertyAttribute("NameScope", System.Windows.NameScope)> Public Class DataRow Inherits Row
'UsageDim instance As DataRow
[TemplatePart(Name="PART_CellsHost", Type=System.Windows.Controls.Panel)] [ContentProperty("Cells")] [StyleTypedProperty(Property="FocusVisualStyle", StyleTargetType=System.Windows.Controls.Control)] [XmlLangProperty("Language")] [UsableDuringInitialization(true)] [RuntimeNameProperty("Name")] [UidProperty("Uid")] [TypeDescriptionProvider(MS.Internal.ComponentModel.DependencyObjectProvider)] [NameScopeProperty("NameScope", System.Windows.NameScope)] public class DataRow : Row
DataRows are the visual representation of the data items that are displayed in a grid's viewport.
Note that because Rows are virtualized, meaning that they only exist when they are in a grid's viewport, references to them, or one of their Cells, should not be kept.
Fixed Columns vs. Templates
In order to support fixed Columns when creating a new Row template for a table-view layout, the following criteria must be met:
The FixedColumnDropMarkPen property is also usually bound when provided a new Row template for a table-view layout.
If a new template is provided for a DataGridControl and fixed Columns are to be supported, it is essential that a TableViewScrollViewer be used. This scroll viewer is responsible for preserving the TranslateTransforms that fix and scroll elements, as well as executing the PageLeft and PageRight actions according to the reduced viewport. It is also recommended that an AdornerDecorator be located above the TableViewScrollViewer of the templated DataGridControl to support drag and dropping of the fixed-Column splitter correctly.
<Grid xmlns:xcdg="http://schemas.xceed.com/wpf/xaml/datagrid"> <Grid.Resources> <xcdg:IndexToOddConverter x:Key="rowIndexConverter"/> <Style TargetType="{x:Type xcdg:DataRow}"> <Style.Triggers> <DataTrigger Binding="{Binding RelativeSource={RelativeSource Self}, Path=(xcdg:DataGridVirtualizingPanel.ItemIndex), Converter={StaticResource rowIndexConverter}}" Value="True"> <Setter Property="Background"> <Setter.Value> <SolidColorBrush Color="LightGray" Opacity="0.1"/> </Setter.Value> </Setter> </DataTrigger> </Style.Triggers> </Style> <xcdg:DataGridCollectionViewSource x:Key="cvs_orders" Source="{Binding Source={x:Static Application.Current}, Path=Orders}"/> </Grid.Resources> <xcdg:DataGridControl x:Name="OrdersGrid" ItemsSource="{Binding Source={StaticResource cvs_orders}}"> </xcdg:DataGridControl> </Grid>
<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}"/> <Style TargetType="{x:Type xcdg:DataRow}"> <Style.Triggers> <DataTrigger Binding="{Binding Path=[EmployeeID]}" Value="1"> <Setter Property="Background" Value="Pink"/> </DataTrigger> <DataTrigger Binding="{Binding Path=[EmployeeID]}" Value="3"> <Setter Property="Background" Value="Blue"/> </DataTrigger> </Style.Triggers> </Style> </Grid.Resources> <xcdg:DataGridControl x:Name="OrdersGrid" ItemsSource="{Binding Source={StaticResource cvs_orders}}"/> </Grid>
<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}"/> <Style TargetType="{x:Type xcdg:DataRow}"> <EventSetter Event="MouseEnter" Handler="DataRowMouseEnter"/> <EventSetter Event="MouseLeave" Handler="DataRowMouseLeave"/> </Style> </Grid.Resources> <xcdg:DataGridControl x:Name="OrdersGrid" ItemsSource="{Binding Source={StaticResource cvs_orders}}" View="TableView.LunaNormalColorTheme"/> </Grid>
System.Object
System.Windows.Threading.DispatcherObject
System.Windows.DependencyObject
System.Windows.Media.Visual
System.Windows.UIElement
System.Windows.FrameworkElement
System.Windows.Controls.Control
Xceed.Wpf.DataGrid.Row
Xceed.Wpf.DataGrid.DataRow
| Name | Description | |
|---|---|---|
![]() | DataRow Constructor |
| Name | Description | |
|---|---|---|
![]() | FindLogicalAncestor<T> | Finds the logical ancenster |
![]() | FindLogicalAncestorsAndSelf | |
![]() | FindLogicalChildren<T> | Find the logical children. |
![]() | FindVisualAncestor<T> | Finds the visual ancestor. |
![]() | FindVisualChildren<T> | Finds the visual children. |
![]() | FindVisualTreeRoot | Finds the visual tree root. |
![]() | ShowDialog | Overloaded. |
.NET: net5.0, net5.0-windows, net6.0, net6.0-macos, net6.0-windows, net7.0, net7.0-macos, net7.0-windows, net8.0, net8.0-browser, net8.0-macos, net8.0-windows, net9.0, net9.0-browser, net9.0-macos, net9.0-windows, net10.0, net10.0-browser, net10.0-macos, net10.0-windows.
.NET Framework: net40, net403, net45, net451, net452, net46, net461, net462, net463, net47, net471, net472, net48, net481.