MindFusion.Reporting for Silverlight Programmer's Guide
DataRange Class
Remarks See Also
 





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

Namespace: MindFusion.Reporting.Silverlight
Assembly: MindFusion.Reporting.Silverlight

 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.DependencyObject
        System.Windows.UIElement
            System.Windows.FrameworkElement
                MindFusion.Reporting.Silverlight.ReportItem
                    MindFusion.Reporting.Silverlight.ItemWithChildren
                        MindFusion.Reporting.Silverlight.ItemWithSections
                            MindFusion.Reporting.Silverlight.DataRange
                                MindFusion.Reporting.Silverlight.SideBySideContainer

 See Also

DataRange Members
MindFusion.Reporting.Silverlight Namespace