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

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

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;
    }
}

Version Information

Supported in: 1.0.1

See Also

In this article
Not finding the help you need?