Represents a report item that provides master-detail relation during data-binding.
Namespace: MindFusion.Reporting.Silverlight
Assembly: MindFusion.Reporting.Silverlight
C# Copy Code |
---|
public class DataRange : ItemWithSections |
Visual Basic Copy Code |
---|
Public Class DataRange |
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"> |
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