i want to ask about how to disable the button when the datagrid have 9 rows?
i want to control the button.after the datagrid have 9 rows, then the button.enabled=false.
Where is the button? in a row of the grid or outside?
See if this helps.
Private Sub DataGridView1_RowsAdded(ByVal sender As Object, ByVal e As System.Windows.Forms.DataGridViewRowsAddedEventArgs) Handles DataGridView1.RowsAdded If DataGridView1.RowCount = 10 Then Button1.Enabled = False End Sub
The button is outside.Thank you.
This thread is solved.^ ^