Asked By ClayB
22-Mar-07 03:50 AM
The code below works in a simple form with a DataGridView and Button
dropped on it.
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
Me.DataGridView1.ColumnCount = 3
Me.DataGridView1.AllowUserToAddRows = False
Me.DataGridView1.Rows.Add(New String() {"abc", "efg", "hij"})
Me.DataGridView1.Rows.Add(New String() {"111", "efg", "hij"})
Me.DataGridView1.Rows.Add(New String() {"222", "efg", "hij"})
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e
As System.EventArgs) Handles Button1.Click
'either works
Me.DataGridView1.RowCount = 0
'Me.DataGridView1.Rows.Clear()
End Sub
==========================
Clay Burch
Syncfusion, Inc.