Wednesday, August 11, 2010

How to delete data from datagrid in vb.net?

i'm not using any database (access or sql), the user simply inputs the data, the data is stored first in an array, sort of like that..How to delete data from datagrid in vb.net?
Assuming your DataGridView is called DataGridView1 and you would like to delete, for example, the third item in the list:





Me.DataGridView1.Rows.Remove ( Me.DataGridView1.Rows( 2 ) )





You can also clear out all of the data with:





Me.DataGridView1.Rows.Clear( )

No comments:

Post a Comment