Controller in DevExpress LayoutControl
I wish you a nice day for you.
In today's article, we will review some of the controls on
the LayoutControl in Devexpress.
In this sample code snippet, we are performing the automatic
clearing of values within the controls on the LayoutControl.
foreach (Control item in layoutControl1.Controls)
{
Control.ControlAccessibleObject type = new ControlAccessibleObject(item);
object c = type.Owner;
switch (c.ToString())
{
case "DevExpress.XtraEditors.TextEdit":
((DevExpress.XtraEditors.TextEdit)type.Owner).Text = "";
break;
case "DevExpress.XtraEditors.GridLookUpEdit":
((DevExpress.XtraEditors.GridLookUpEdit)type.Owner).EditValue = null;
break;
case "DevExpress.XtraEditors.LookUpEdit":
((DevExpress.XtraEditors.LookUpEdit)type.Owner).EditValue = null;
break;
case "DevExpress.XtraEditors.MemoEdit":
((DevExpress.XtraEditors.MemoEdit)type.Owner).Text = "";
break;
default:
break;
}
}
Yorumlar
Yorum Gönder