Ext.Net 1.x_Ext.Net_遍历清空textbox控件

        /*遍历ext.net TextBox 控件并将其清空*/
        public void ergodicExtControl(FormPanel extform)
        {
            foreach (Control ctl in extform.Controls)
            {
                if (ctl is Ext.Net.XControl)
                {
                    if (ctl.GetType().Name == "TextField")
                    {
                        TextField ctltext = (TextField)ctl;
                        ctltext.Value = "";
                    }
                    else if (ctl.HasControls() && ctl.GetType().Name == "FormPanel")
                    {
                        FormPanel frmpnl = (FormPanel)ctl;
                        ergodicExtControl(frmpnl);//递归
                    }
                }
            }
        }


 来自:

http://cheeruplc.iteye.com/blog/1680284

你可能感兴趣的:(Ext.Net 1.x_Ext.Net_遍历清空textbox控件)