MindFusion.Wpf Pack Programmer's Guide
DataRange Class
Remarks See Also
 





Represents a report item that provides master-detail relation during data-binding.

Namespace: MindFusion.Reporting.Wpf
Assembly: MindFusion.Reporting.Wpf

 Syntax

C#  Copy Code

public class DataRange : ItemWithSections

Visual Basic  Copy Code

Public Class DataRange
    Inherits ItemWithSections

 Remarks

The DataRange element is a report item, which can hold other report items and can also provide header and footer. The data source of the DataRange is specified by the DataSource property. If DataSource is null (Nothing in Visual Basic) the DataRange raises the QueryDetails event of its containing report passing its DataContext as a master row and uses the return IEnumeration as data source. If QueryDetails did not yield any details, the DataContext is used as a data source.

The DataRange performs special processing to its content when the report is run. For each object in its data source, the DataRange creates a new instance of the contents specified by its ItemTemplate property and sets the data source object as DataContext of this instance. The root object in the DataTemplate associated with the ItemTemplate property needs to be an ItemContainer object.

The following example demonstrates a sample DataRange object declared in XAML:

XAML  Copy Code

<r:DataRange DataSource="{Binding Categories}" Size="200,20">
  <r:DataRange.ItemTemplate>
    <DataTemplate>
      <r:ItemContainer>
        <r:Label Text="{Binding CategoryName}" Size="100%,20" />
      </r:ItemContainer>
    </DataTemplate>
  </r:DataRange.ItemTemplate>
</r:DataRange>

 Inheritance Hierarchy

System.Object
    System.Windows.Threading.DispatcherObject
        System.Windows.DependencyObject
            System.Windows.Media.Visual
                System.Windows.UIElement
                    System.Windows.FrameworkElement
                        MindFusion.Reporting.Wpf.ReportItem
                            MindFusion.Reporting.Wpf.ItemWithChildren
                                MindFusion.Reporting.Wpf.ItemWithSections
                                    MindFusion.Reporting.Wpf.DataRange
                                        MindFusion.Reporting.Wpf.SideBySideContainer

 See Also

DataRange Members
MindFusion.Reporting.Wpf Namespace