Set button name in datagridview in c#

Posted by  marcel ethan
 2376  View(s)
Rate this:
Hi every one,

These days i'm working on DataGridView in winform. I have added button in one column. This button generated for every rows. I have added button successfully but problem is that I con't set name of button.

Thank in advance
  1. Re: Set button name in datagridview in c#

    Hi Marcel Ethan

    Write below code within Page Load event.

    foreach (DataGridViewRow row in dgvControl.Rows)
                    DataGridViewCell cell = row.Cells[6];//Column Index
                    cell.Value = "Delete";

    I hope it resolve your problem.

      Modified On Mar-29-2018 06:07:39 AM