duheng
2025-04-07 4265cdf374c215edf5284cb7fc751060266ec473
WinFrmUI/Yw.WinFrmUI.Core/00-core/GridViewExtensions.cs
@@ -42,8 +42,6 @@
            grid.OptionsBehavior.Editable = false;
            grid.OptionsBehavior.ReadOnly = true;
            grid.OptionsView.EnableAppearanceOddRow = true;   // 使能 // 和和上面绑定 同时使用有效
            grid.Appearance.EvenRow.BackColor = Color.FromArgb(244, 248, 251);  // 设置偶数行颜色
            grid.OptionsView.EnableAppearanceEvenRow = true;
@@ -83,7 +81,6 @@
            grid.OptionsView.EnableAppearanceEvenRow = true;
            grid.Appearance.OddRow.BackColor = Color.White; // 设置偶数行颜色
            grid.RowHeight = height;
            grid.ColumnPanelRowHeight = height;
            grid.GroupRowHeight = height;
@@ -119,7 +116,6 @@
            grid.Appearance.OddRow.BackColor = Color.White;
            grid.Appearance.EvenRow.BackColor = Color.FromArgb(244, 248, 251);
            grid.RowHeight = height;
            grid.ColumnPanelRowHeight = height;
            grid.GroupRowHeight = height;
@@ -154,7 +150,6 @@
            grid.Appearance.EvenRow.BackColor = Color.FromArgb(244, 248, 251);  // 设置偶数行颜色
            grid.OptionsView.EnableAppearanceEvenRow = true;
            grid.Appearance.OddRow.BackColor = Color.White; // 设置偶数行颜色
            grid.RowHeight = height;
            grid.ColumnPanelRowHeight = height;
@@ -219,8 +214,6 @@
            grid.ColumnPanelRowHeight = height;
            grid.GroupRowHeight = height;
            grid.BestFitColumns();
        }
        /// <summary>
@@ -330,7 +323,7 @@
            return row;
        }
        #endregion
        #endregion 默认
        /// <summary>
        /// 绑定按列分组视图设置 Nsx_20210729
@@ -372,7 +365,6 @@
            grid.BestFitColumns();
        }
        /// <summary>
        /// 普通编辑视图设置
        /// </summary>
@@ -402,17 +394,15 @@
            grid.Appearance.OddRow.BackColor = Color.White;
            grid.Appearance.EvenRow.BackColor = Color.FromArgb(244, 248, 251);
            grid.RowHeight = height;
            grid.ColumnPanelRowHeight = height;
            grid.GroupRowHeight = height;
            grid.BestFitColumns();
        }
        /// <summary>
        /// 设置拖拽状态下的普通视图
        /// </summary>
        /// </summary>
        public static void SetDragNormalView<t>(this GridView rhs, int height = 30) where t : class
        {
            rhs.SetNormalView(height);
@@ -431,7 +421,6 @@
                    }
                }
            };
            rhs.MouseMove += (sender, e) =>
            {
@@ -457,10 +446,5 @@
                }
            };
        }
    }
}
}