Home > DeveloperSection > Forums > Set button name in datagridview in c#
marcel ethan
marcel ethan

Total Post:105

Points:735
Posted on    January-04-2013 3:44 AM

 C# C# 
Ratings:


 1 Reply(s)
 1393  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


AVADHESH PATEL

Total Post:604

Points:4228
Posted on    January-04-2013 7:38 AM

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.

Don't want to miss updates? Please click the below button!

Follow MindStick