0

This is the datagridview that I have current dgview

But I want to merge columns in the gridview so it looks like in this screenshot:

screenshot

My code:

foreach (DataRow row in dt.Rows)
{
    dgc[i] = new DataGridViewTextBoxColumn();
    dgc[i].HeaderText = row["account_name"].ToString();
    dataGridView1.Columns.Add(dgc[i]);

    i++;
}
marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
Hewad
  • 23
  • 1
  • 9

0 Answers0