Exemplo n.º 1
0
 /// <summary>
 /// 遍历得到SearchLookUpEdit自带GridView中的按钮
 /// </summary>
 /// <param name="Form"></param>
 /// <param name="strName"></param>
 /// <returns></returns>
 public static LayoutControlItem GetFindControlLayoutItem(PopupBaseForm Form, string strName)
 {
     if (Form != null)
     {
         foreach (Control FormC in Form.Controls)
         {
             if (FormC is SearchEditLookUpPopup)
             {
                 SearchEditLookUpPopup SearchPopup = FormC as SearchEditLookUpPopup;
                 foreach (Control SearchPopupC in SearchPopup.Controls)
                 {
                     if (SearchPopupC is LayoutControl)
                     {
                         LayoutControl FormLayout = SearchPopupC as LayoutControl;
                         Control       Button     = FormLayout.GetControlByName(strName);
                         if (Button != null)
                         {
                             return(FormLayout.GetItemByControl(Button));
                         }
                     }
                 }
             }
         }
     }
     return(null);
 }