i have a data gridview with 4 columns namely name age address and attendance. my problem is this ,using a button how i change the attendance in all to "OUT"? help me please

If the data is in a database, just execute the statement on every record.

Something to the tone of:

"UPDATE table SET column='OUT'"

Use a loop to run through all the rows in your datagrid. You could use a code like this in the button routine.

For i = 0 To DataGridView1.CurrentRow.Index - 1
        DataGridView1.Rows(i).Cells("Column4").Value = "OUT"
Next
For Each row As DataGridViewRow In My.Forms.Main.DataGridView1.Rows
    DataGridView1.Rows(row).Cells("Column4").Value = "OUT"
Next
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.