public void AddRowToDataGridUsingEvent(DataGridView grid, UiEvent uiEvent) { DataGridViewRow row = new DataGridViewRow(); row.CreateCells(grid); row.DefaultCellStyle.Font = new Font("Tahoma", 9); BllEvent Event = uiEvent.EventData; row.Cells[ColumnIndicies[COL_SENDER]].Value = Event.Sender.Fullname; row.Cells[ColumnIndicies[COL_TITLE]].Value = Event.Name; row.Cells[ColumnIndicies[COL_DATE]].Value = Event.Date.ToString(DATE_FORMAT); row.Cells[ColumnIndicies[COL_TIME]].Value = Event.Date.ToString(TIME_FORMAT); row.Cells[ColumnIndicies[COL_DESCTIPTION]].Value = Event.Description; row.Cells[ColumnIndicies[COL_NOTE]].Value = uiEvent.Note; SetStatusInRow(row, Event); SetAttributeInRow(row, Event); SetFileCountInRow(row, Event); uiEvent.SetRowStyle(row); grid.Rows.Add(row); if (uiEvent.MissedStatus) { RowStyleManager.MakeCellBoldFont(row.Cells[ColumnIndicies[COL_STATUS]]); } }
public void SetRegularStyleForRow(DataGridViewRow row) { RowStyleManager.MakeRowBackgroundAsRegular(row); }
public void SetDeletedStyleForRow(DataGridViewRow row) { RowStyleManager.MakeRowBackgroungAsDeleted(row); }