2
Contributors
2
Replies
10
Views
7 Years
Discussion Span
Last Post by Exaktor
0

To make a button in the column, use the DataGridViewButtonColumn object. Then, you can create an onclick event to handle your editing/deleting.

DataGridViewButtonColumn buttonColumn = 
            new DataGridViewButtonColumn();
        buttonColumn.HeaderText = "Delete/Edit";

I know that code to remove a row is:

DataGridView1.Rows.RemoveAt(index)

Hope that helps.

0

Now I made an edit button. What is the code so a new form shows up when i click the button and where should I put that code?

Should I put the code inside the code below or somewhere else.

private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e)
        {

        }

Edited by Exaktor: n/a

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.