private void populateGridWithMessage(string fileName) { FileName = fileName.Replace("\\", "/"); DataTable dt = SystemMessage.SelectRecord(FileName); dataGrid.DataSource = dt; dataGrid.Columns[0].AutoSizeMode = DataGridViewAutoSizeColumnMode.AllCells; if (expanded == false) { expanded = true; this.ClientSize = new System.Drawing.Size(1145, 565); btnExpand.Text = expanded ? "<-" : "->"; } }
public void InitMessageGrid(string fileName = "") { if (fileName != "") { FileName = fileName.Replace("\\", "/"); } DataTable dt = SystemMessage.SelectRecord(FileName); messageGrid.DataSource = dt; messageGrid.Columns[0].AutoSizeMode = DataGridViewAutoSizeColumnMode.AllCells; dt = SystemMessage.SelectRecord(FileName, true); messageGridOld.DataSource = dt; messageGridOld.Columns[0].AutoSizeMode = DataGridViewAutoSizeColumnMode.AllCells; }