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
| private void InitialiseLogsListe()
{
// On lie la grille au données
this.LogsListBindingSource.DataSource = this.LogHandler.getLogsByType(this.cbx_LogType.SelectedValue.ToString(), StaticUtils.DebugMode);
this.ActualLogFilter = this.cbx_LogType.SelectedValue.ToString();
this.dgv_Logs.DataSource = this.LogsListBindingSource;
// On reformatte l'affichage de la grille
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["id_log"].Visible = false;
this.dgv_Logs.Columns["id_log"].DisplayIndex = 0;
this.dgv_Logs.Columns["derniere_session"].Visible = false;
this.dgv_Logs.Columns["derniere_session"].DisplayIndex = 1;
this.dgv_Logs.Columns["cree_le"].AutoSizeMode = DataGridViewAutoSizeColumnMode.AllCells;
this.dgv_Logs.Columns["cree_le"].DisplayIndex = 2;
this.dgv_Logs.Columns["cree_le"].HeaderText = "Date création";
this.dgv_Logs.Columns["type_log"].AutoSizeMode = DataGridViewAutoSizeColumnMode.AllCells;
this.dgv_Logs.Columns["type_log"].DisplayIndex = 3;
this.dgv_Logs.Columns["type_log"].HeaderText = "Type";
this.dgv_Logs.Columns["texte"].AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
this.dgv_Logs.Columns["texte"].DisplayIndex = 4;
this.dgv_Logs.Columns["texte"].HeaderText = "Message";
this.dgv_Logs.CellBorderStyle = DataGridViewCellBorderStyle.None;
} |
Partager