Set button name in datagridview in c#

Total Post:104

Points:728
C# 
C#
 2095  View(s)
Ratings:
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. Post:604

    Points:4228
    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

Answer

NEWSLETTER

Enter your email address here always to be updated. We promise not to spam!