Progress® Telerik® Reporting R3 2017

ElementTreeHelperContainsChildWithName Method

Determines whether a parent layout element contains immediate child having a specified name.

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

Syntax

public static bool ContainsChildWithName(
	LayoutElement parent,
	string name
)

Parameters

parent
Type: Telerik.Reporting.ProcessingLayoutElement
The parent element to search within.
name
Type: SystemString
The name to search for.

Return Value

Type: Boolean
true if an layout element having the specified parent and name is found; Otherwise, false.

Examples

This example shows how to determine if a child with name is contained in a ItemDataBinding event handler.
void DetailSection_ItemDataBinding_Using_ContainsChildWithName(object sender, EventArgs e)
{
    Processing.DetailSection processingInstance = (Processing.DetailSection)sender;
    if (Processing.ElementTreeHelper.ContainsChildWithName(processingInstance, "textBox1"))
    {
        processingInstance.Style.BackgroundColor = System.Drawing.Color.Blue;
    }
}

See Also