#region 行号 /// <summary> /// 行号 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void gridView1_CustomDrawRowIndicator(object sender, DevExpress.XtraGrid.Views.Grid.RowIndicatorCustomDrawEventArgs e) { e.Appearance.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Far; if (e.Info.IsRowIndicator) { ) { e.Info.DisplayText = (e.RowHandle + ).ToString(); } && e.RowHandle > -) { e.Info.Appearance.BackColor = System.Drawing.Color.AntiqueWhite; e.Info.DisplayText = "G" + e.RowHandle.ToString(); } } } #endregion #region gridView 行样式 /// <summary> /// gridView 行样式 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void gridView1_RowStyle(object sender, DevExpress.XtraGrid.Views.Grid.RowStyleEventArgs e) { ) return; models.info info = (models.info)this.gridView1.GetRow(e.RowHandle); if (info == null) return; ") { //e.Appearance.ForeColor = Color.Yellow; e.Appearance.BackColor = Color.Yellow; e.Appearance.BackColor2 = Color.Yellow; } } #endregion