kyy
2025-11-25 91777cd07bb42802b2ac730cc6c35750ab7cc69e
DevApp/Gs.DevApp/ToolBox/UtilityHelper.cs
@@ -1846,6 +1846,30 @@
                    action2(_guid);
                };
            }
            gridView1.RowCellStyle += (s, e) =>
            {
                GridView view = s as GridView;
                if (view != null && e.Column != null && e.CellValue != null)
                {
                    if (e.Column.FieldName.EndsWith("Color"))
                    {
                        int rowHandle = e.RowHandle;
                        if (rowHandle >= 0)
                        {
                            DataRow row = gridView1.GetDataRow(e.RowHandle);
                            string _bgColor = row[e.Column.FieldName + "Rgb"].ToString();
                            if (!string.IsNullOrEmpty(_bgColor))
                            {
                                Color bgColor = ColorTranslator.FromHtml(_bgColor);
                                e.Appearance.BackColor = bgColor;
                                //e.Appearance.BackColor2 = Color.LightSkyBlue;
                                //e.Appearance.ForeColor = ColorTranslator.FromHtml("#ffffff") ;
                            }
                        }
                    }
                }
            };
            gridView1.RowStyle += (s, e) =>
            {
                //默认选中行不变色