private void Populate_Charges(string DieType) { DieType dt = (DieType)System.Enum.Parse(typeof(DieType), DieType); List <DieCharge> DC_List = parent.Charge_Dictionary[dt]; dataGridView1.Rows.Clear(); foreach (DieCharge DC in DC_List) { dataGridView1.Rows.Add(DC.Name, DC.GetFormula()); } // Add empty row dataGridView1.Rows.Add(); // Remove last delete button foreach (DataGridViewRow row in dataGridView1.Rows) { DataGridViewCellStyle style = new DataGridViewCellStyle(); style.Padding = new Padding(0, 0, (row == dataGridView1.Rows[dataGridView1.Rows.Count - 1] ? 1000 : 0), 0); style.BackColor = Color.FromArgb(76, 76, 76); style.ForeColor = Color.White; row.Cells[2].Style = style; } }