I've a number of Devexpress controls on my form under layoutcontrol1. I used the code below to iterate through each control and clear the existing data when users click on "Clear" button. However, it doesn't work on LookupEdit (set the EditValue to 0) and CheckedListBoxControl (uncheck all the selected items).
foreach (Control c in layoutControl1.Controls)
{
if (c.GetType() == typeof(TextEdit) || c.GetType()==typeof(MemoEdit))
c.Text = String.Empty;
if (c.GetType() == typeof(LookUpEdit))
c.EditValue = 0; //doesn't have EditValue property
if (c.GetType() == typeof(CheckedListBoxControl))
c.CheckedItems = CheckState.Unchecked; //doesn't have such property
}
Any suggestion?