Click here to Skip to main content
15,905,420 members
Please Sign up or sign in to vote.
2.00/5 (1 vote)
See more:
Hi
I want to know how to clear a text from designed layoutcontrol input items(TextEdit,Comboedit). i know i can clear individually for ex: textbox1.Text=""; or textbox1.Text=String.Empty;. but is there anyother way to clear the text in a single line.
Posted

Create a method in which empty all the user controls as u mentioned above in your own question by setting up " " and than call that method in your submit button (button which is manipulating your form.)


Regards,
:)
 
Share this answer
 
Hi ,
i got another one solution

foreach (Control ctl in this.layoutControl1.Controls)
           {
               if (ctl is DevExpress.XtraEditors.TextEdit) ctl.Text = string.Empty;
               if (ctl is DevExpress.XtraEditors.ComboBoxEdit) ctl.Text = string.Empty;

           }
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900