啊鑫
2024-12-09 2a8c7b4e3ebe5691fbbe84d8cf285be3f72b7c30
DevApp/Gs.DevApp/ToolBox/UtilityHelper.cs
@@ -1362,6 +1362,8 @@
        /// <param name="icoName">图标路径</param>
        public static void SetGridSear(GridView gridView1, PictureBox btnChkIco = null, Form fm = null, string fileName = "checkStatus", string icoName = "")
        {
         //   gridView1.OptionsView.ColumnAutoWidth = false;自动调整列宽
            foreach (GridColumn column in gridView1.Columns)
            {
                column.OptionsFilter.AutoFilterCondition = AutoFilterCondition.Contains;
@@ -1430,22 +1432,7 @@
                    e.Bounds.Top + 45, e.Bounds.Right - 5, e.Bounds.Height - 5);
                e.Graphics.DrawString(str, f, Brushes.Gray, r);
            };
        }
        #endregion
        public static bool IsNumeric(string str)
        {
            Regex regex = new Regex("^[0-9]+$");
            return regex.IsMatch(str);
        }
        /// <summary>
        /// yz_quantity_0,yz_字段_类型
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        public static void SetValidatingEditor(object sender, BaseContainerValidateEditorEventArgs e)
            gridView1.ValidatingEditor += (sender, e) =>
        {
            //yz_quantity_0
            GridView view = sender as GridView;
@@ -1462,8 +1449,19 @@
                    }
                }
            }
            };
        }
        #endregion
        public static bool IsNumeric(string str)
        {
            Regex regex = new Regex("^[0-9]+$");
            return regex.IsMatch(str);
        }
    }
    /// <summary>