0

hi

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.

tq.

3
Contributors
3
Replies
4
Views
6 Years
Discussion Span
Last Post by sarifah n
0

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
This question has already been answered. 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.