VAGSuite.frmPartNumberList.gridView1_CustomDrawCell C# (CSharp) Метод

gridView1_CustomDrawCell() приватный Метод

private gridView1_CustomDrawCell ( object sender, DevExpress e ) : void
sender object
e DevExpress
Результат void
        private void gridView1_CustomDrawCell(object sender, DevExpress.XtraGrid.Views.Base.RowCellCustomDrawEventArgs e)
        {
            if (e.Column.FieldName == "Partnumber")
            {
                if (e.CellValue != null)
                {
                    if (e.CellValue != DBNull.Value)
                    {
                        int type = CheckInAvailableLibrary(e.CellValue.ToString());
                        if (type == 1)
                        {
                            e.Graphics.FillRectangle(Brushes.YellowGreen, e.Bounds);
                        }
                        if (type == 2)
                        {
                            e.Graphics.FillRectangle(Brushes.YellowGreen, e.Bounds);
                        }
                    }
                }
            }
        }