Home > Net >  DataGridView data to remove
DataGridView data to remove

Time:09-28

DataGridView1. Rows (0). The Cells (0). The Value="apricot 18 note https://bbs.csdn.net/topics/
"DataGridView1. Rows (1) Cells (0). The Value="https://bbs.csdn.net/topics/a deep note apricot"
DataGridView1. Rows (2) Cells (0). The Value="apricot note 23 https://bbs.csdn.net/topics/
"DataGridView1. Rows (3) Cells (0). The Value="https://bbs.csdn.net/topics/apricot 19 note
"The above is a custom form content
Want to pass a button to clear all the data in the DataGridView1

CodePudding user response:

Can make a loop to remove

CodePudding user response:

The Do While DataGridView1. Rows. Count & lt;> 0

DataGridView1. Rows. RemoveAt (0)
Loop

CodePudding user response:

If you want to remove all, directly. The rowcount=0, don't literally be deleted

CodePudding user response:

Similar: DataGridView1 DataSource=null; Can be

CodePudding user response:

Problem has been solved, thank you

CodePudding user response:

Water not digging a well ha
  • Related