Xceed DataGrid for WPF v7.3 Documentation
Xceed.Wpf.DataGrid Assembly / Xceed.Wpf.DataGrid Namespace / EntityDetailDescription Class
Members Example


In This Topic
    EntityDetailDescription Class
    In This Topic
    The EntityDetailDescription class provides information about a EntityCollection<TEntity> detail relation and whose content will be displayed as the details of the master data items in a grid or as the data items of another detail.
    Syntax
    'Declaration
     
    <TypeDescriptionProviderAttribute(MS.Internal.ComponentModel.DependencyObjectProvider)>
    <NameScopePropertyAttribute("NameScope", System.Windows.NameScope)>
    Public Class EntityDetailDescription 
       Inherits DataGridDetailDescription
    'Usage
     
    Dim instance As EntityDetailDescription
    [TypeDescriptionProvider(MS.Internal.ComponentModel.DependencyObjectProvider)]
    [NameScopeProperty("NameScope", System.Windows.NameScope)]
    public class EntityDetailDescription : DataGridDetailDescription 
    Remarks

    By default the Entity Framework does not load references to related entity objects. In this situation, the QueryDetails event exposed by the EntityDetailDescription class can be handled to provide details for a data item. For example, in the code snippet above , a query that will return the appropriate details for a parent item is executed and the Handled property set to true to indicate that the event was handled. In the case where the event is not handled and columns contain references to external Entity objects, the column would have remained empty unless those objects had been cached when loaded by some other means.

    Because an Entity object does not have a default visual representation, its string representation will be displayed in the column. In order to change its appearance, a CellContentTemplate must be provided.

    Example
    Private Sub EntityDetailDescription_QueryDetails( sender As Object, e As QueryEntityDetailsEventArgs )
    
      Dim customer As Customer = TryCast( e.ParentItem, Customer )
    
      ' Since EntityFramework doesn't load automatically references to
      ' other objects, we build a query that will include those objects.
      ' We start from the base query but we could have added restrictions
      ' to the query.
      Dim query As ObjectQuery( Of Order ) = customer.Orders.CreateSourceQuery()
      customer.Orders.Attach( query.Include( "Employee" ).Include( "Shipper" ) )
    
      e.Handled = True
    End Sub
    private void EntityDetailDescription_QueryDetails( object sender, QueryEntityDetailsEventArgs e )
    {
      Customer customer = ( Customer )e.ParentItem;
    
      // Since EntityFramework doesn't load automatically references to
      // other objects, we build a query that will include those objects.
      // We start from the base query but we could have added restrictions
      // to the query.
      ObjectQuery<Order> query = customer.Orders.CreateSourceQuery();
      customer.Orders.Attach( query.Include( "Employee" ).Include( "Shipper" ) );
    
      e.Handled = true;
    }
    Inheritance Hierarchy

    System.Object
       System.Windows.Threading.DispatcherObject
          System.Windows.DependencyObject
             Xceed.Wpf.DataGrid.DataGridDetailDescription
                Xceed.Wpf.DataGrid.EntityDetailDescription

    Public Constructors
     NameDescription
    Public ConstructorOverloaded.   
    Top
    Public Properties
     NameDescription
    Public PropertyGets or sets a value indicating whether detail descriptions are to be automatically created. (Inherited from Xceed.Wpf.DataGrid.DataGridDetailDescription)
    Public PropertyGets a value indicating whether the foreign key descriptions are automatically created. (Inherited from Xceed.Wpf.DataGrid.DataGridDetailDescription)
    Public PropertyGets or sets a value indicating whether item properties are to be automatically created. (Inherited from Xceed.Wpf.DataGrid.DataGridDetailDescription)
    Public PropertyGets or sets a value indicating how automatic filtering of the data items in the detail will be performed. (Inherited from Xceed.Wpf.DataGrid.DataGridDetailDescription)
    Public PropertyGets a dictionary that contains a list of the detail's DataGridItemProperty objects with their corresponding auto-filter values. (Inherited from Xceed.Wpf.DataGrid.DataGridDetailDescription)
    Public PropertyGet or sets the default value of the CalculateDistinctValues property when a DataGridItemProperty has not explicitly set its value. (Inherited from Xceed.Wpf.DataGrid.DataGridDetailDescription)
    Public Property (Inherited from System.Windows.DependencyObject)
    Public PropertyGets a collection of DataGridDetailDescription objects that provide information on the details that will be contained in the detail, including sorting, grouping, and child detail descriptions. (Inherited from Xceed.Wpf.DataGrid.DataGridDetailDescription)
    Public Property (Inherited from System.Windows.Threading.DispatcherObject)
    Public PropertyGets or sets a value representing the constraint applied to the distinct values of the underlying DataGridCollectionView when automatically filtering data items. (Inherited from Xceed.Wpf.DataGrid.DataGridDetailDescription)
    Public PropertyGets or sets a value indicating how filters entered into a FilterRow are applied. (Inherited from Xceed.Wpf.DataGrid.DataGridDetailDescription)
    Public PropertyGets a collection of group descriptions that describe how the items in the detail are grouped. (Inherited from Xceed.Wpf.DataGrid.DataGridDetailDescription)
    Public Property (Inherited from System.Windows.DependencyObject)
    Public PropertyGets a collection of DataGridItemProperty objects, which represent the items that are contained in the detail. (Inherited from Xceed.Wpf.DataGrid.DataGridDetailDescription)
    Public PropertyGets or sets the relation name of the detail. (Inherited from Xceed.Wpf.DataGrid.DataGridDetailDescription)
    Public PropertyGets a collection of SortDescription objects that describe how the items in the collection are sorted in the detail. (Inherited from Xceed.Wpf.DataGrid.DataGridDetailDescription)
    Public PropertyGets a collection of the statistical functions whose results can be used by various elements throughout the detail. (Inherited from Xceed.Wpf.DataGrid.DataGridDetailDescription)
    Public PropertyGets or sets the title that can be used to provide a user-friendly name for the detail configuration associated with the detail description. (Inherited from Xceed.Wpf.DataGrid.DataGridDetailDescription)
    Public PropertyGets or sets the template that will be used to display the description's title. (Inherited from Xceed.Wpf.DataGrid.DataGridDetailDescription)
    Top
    Public Methods
    Protected Methods
     NameDescription
    Protected Internal MethodOverridden. Retrieves the details for the specified parent data item.  
    Protected Internal MethodInitializes the detail using the information retrieved from the specified parent collection view. (Inherited from Xceed.Wpf.DataGrid.DataGridDetailDescription)
    Protected Method (Inherited from System.Windows.DependencyObject)
    Protected MethodRaises the QueryDetails event.  
    Protected MethodInvoked whenever a WeakEventManager delivers the event being managed by the class. (Inherited from Xceed.Wpf.DataGrid.DataGridDetailDescription)
    Protected Internal Method (Inherited from System.Windows.DependencyObject)
    Top
    Extension Methods
     NameDescription
    Public Extension MethodOverloaded. 
    Top
    Public Events
     NameDescription
    Public EventRaised to (optionally) provided details for a data item.  
    Top
    Requirements

    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

    See Also