Posted 01 Jul 2013 Link to this post
public
IEnumerable<Control> GetAll(Control control, Type type)
{
var controls = control.Controls.Cast<Control>();
return
controls.SelectMany(ctrl => GetAll(ctrl, type))
.Concat(controls)
.Where(c => c.GetType() == type);
}
var q = GetAll(
this
,
typeof
(RadTextBox));
foreach
(RadTextBox frtb
in
q)
//operations with the control here
Posted 04 Jul 2013 Link to this post