Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private void days(object sender, DataGridViewCellFormattingEventArgs e)
- {
- var senderGrid = (DataGridView)sender;
- if (senderGrid.Columns[e.ColumnIndex] is DataGridViewButtonColumn && e.RowIndex >= 0)
- {
- var c = SmanArea.Rows[e.RowIndex].Cells[e.ColumnIndex];
- if (c.Value.ToString() == "1" && c is DataGridViewButtonCell)
- {
- c.Style.BackColor = Color.LightGreen;
- }
- else
- {
- c.Style.BackColor = Color.RosyBrown;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement