Progress® Telerik® Reporting R3 2017

ElementTreeHelperGetChildElements Method

Returns all immediate child layout elements within a specified parent.

Namespace:  Telerik.Reporting.Processing
Assembly:  Telerik.Reporting (in Telerik.Reporting.dll)

Syntax

public static IEnumerable<LayoutElement> GetChildElements(
	LayoutElement parent
)

Parameters

parent
Type: Telerik.Reporting.ProcessingLayoutElement
The parent element.

Return Value

Type: IEnumerableLayoutElement
Enumerable of all layout elements having the specified parent. If the parent does not have children, an empty enumeration is returned.

Examples

This example shows how to access all children of a parent layout element in a ItemDataBinding event handler.
void DetailSection_ItemDataBinding_Using_GetChildElements(object sender, EventArgs e)
{
    Processing.DetailSection processingInstance = (Processing.DetailSection)sender;
    IEnumerable<Processing.LayoutElement> elements = Processing.ElementTreeHelper.GetChildElements(processingInstance);
    foreach (Processing.LayoutElement child in elements)
    {
        Processing.VisualElement visualChild = child as Processing.VisualElement;
        if (null != visualChild)
        {
            visualChild.Style.BackgroundColor = System.Drawing.Color.Blue;
        }
    }
}

See Also