1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44
| /// <summary>
/// Initialize the log list with selected filter in the logs combobox.
/// </summary>
private void InitializeLogList()
{
// Link the grid with log combobox value
this.UpdateLogDataGridFromCombobox();
// Format the datagridview
this.dgv_Logs.RowHeadersVisible = false;
this.dgv_Logs.AllowUserToAddRows = false;
this.dgv_Logs.AllowUserToDeleteRows = false;
this.dgv_Logs.AllowUserToOrderColumns = true;
this.dgv_Logs.AllowUserToResizeColumns = true;
this.dgv_Logs.AllowUserToResizeRows = false;
this.dgv_Logs.ReadOnly = true;
this.dgv_Logs.SelectionMode = DataGridViewSelectionMode.FullRowSelect;
this.dgv_Logs.Columns["LOG_ID"].Visible = false;
this.dgv_Logs.Columns["LOG_ID"].DisplayIndex = 0;
this.dgv_Logs.Columns["IS_LAST_SESSION"].Visible = false;
this.dgv_Logs.Columns["IS_LAST_SESSION"].DisplayIndex = 1;
this.dgv_Logs.Columns["MODIFICATION_DATE"].Visible = false;
this.dgv_Logs.Columns["MODIFICATION_DATE"].DisplayIndex = 2;
this.dgv_Logs.Columns["CREATION_DATE"].Visible = true;
this.dgv_Logs.Columns["CREATION_DATE"].AutoSizeMode = DataGridViewAutoSizeColumnMode.AllCells;
this.dgv_Logs.Columns["CREATION_DATE"].DisplayIndex = 3;
this.dgv_Logs.Columns["CREATION_DATE"].HeaderText = "Date création";
this.dgv_Logs.Columns["LOG_TYPE"].Visible = true;
this.dgv_Logs.Columns["LOG_TYPE"].AutoSizeMode = DataGridViewAutoSizeColumnMode.AllCells;
this.dgv_Logs.Columns["LOG_TYPE"].DisplayIndex = 4;
this.dgv_Logs.Columns["LOG_TYPE"].HeaderText = "Type";
this.dgv_Logs.Columns["LOG_TEXT"].Visible = true;
this.dgv_Logs.Columns["LOG_TEXT"].AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
this.dgv_Logs.Columns["LOG_TEXT"].DisplayIndex = 5;
this.dgv_Logs.Columns["LOG_TEXT"].HeaderText = "Message";
this.dgv_Logs.CellBorderStyle = DataGridViewCellBorderStyle.None;
} |
Partager