Skip to content

DevExpress-Examples/asp-net-web-forms-get-child-editors-in-container

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ASP.NET Web Forms - How to get all DevExpress data editors in a container

This example demonstrates how to implement a method that returns a list of child data editors placed in a parent container.

private static List<ASPxEdit> GetChildControls(object Container, List<ASPxEdit> controlsList, Func<Control, bool> predicate) {
    Control c = Container as Control;
    if (c == null || c.Controls.Count == 0)
        return controlsList;
    foreach (Control item in c.Controls) {
        if (item is ASPxEdit && (predicate == null || predicate(item) == true)) {
            controlsList.Add((ASPxEdit)item);
        }
        if (item.Controls.Count > 0)
            controlsList = GetChildControls(item, controlsList, predicate);
    }
    return controlsList;
}

Files to Review

Does this example address your development requirements/objectives?

(you will be redirected to DevExpress.com to submit your response)

About

Obtain a list of child data editors placed in a parent container.

Topics

Resources

License

Stars

Watchers

Forks

Contributors 4

  •  
  •  
  •  
  •