SET BUTTON NAME IN DATAGRIDVIEW IN C#

marcel ethan

Total Post:105

Points:735
Posted by  marcel ethan
C# 
C#
 1796  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. AVADHESH PATEL

    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.

Answer

NEWSLETTER

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