private static void DrawCustomizationMark(object sender, RowIndicatorCustomDrawEventArgs e) { var view = sender as GridView; if (view != null && e.RowHandle == GridControl.InvalidRowHandle && view.Columns.Count(c => !c.Visible && c.OptionsColumn.AllowShowHide) > 0) { e.DefaultDraw(); DrawHiddenFieldsIcon(e.Graphics, e.Bounds); e.Handled = true; } }
private void gvBOSExternalEntity_CustomDrawRowIndicator(object sender, RowIndicatorCustomDrawEventArgs e) { try { if (e.RowHandle > -1) { if (ActiveViewOption != null) { //DataTable table1 = TempDataTableCreator.CreateDataTableFromEntity(gvExample.GetRow(e.RowHandle)); DataTable table = gvBOSExternalEntity.GetRow(e.RowHandle).ConvertToDataTable(); ApptStatus status = ActiveViewOption.GetApptStatus(table); e.DefaultDraw(); if (status != null) { e.Appearance.BackColor = Color.FromArgb(status.ColourRGB); e.Appearance.FillRectangle(e.Cache, new Rectangle(e.Bounds.X, e.Bounds.Y, e.Bounds.Width - 1, e.Bounds.Height - 1)); if (e.Info.IsRowIndicator) { if (!(e.Info.ImageIndex < 0)) { ImageCollection ic = e.Info.ImageCollection as ImageCollection; Image indicator = ic.Images[e.Info.ImageIndex]; e.Cache.Paint.DrawImage(e.Graphics, indicator, new Rectangle(e.Bounds.X + 4, e.Bounds.Y + 20, indicator.Width, indicator.Height)); } } e.Handled = true; } } } } catch (Exception ex) { Logger.Error(ex.Message, ex); #if DEBUG throw ex; #endif } }