"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 removeCodePudding user response:
The Do While DataGridView1. Rows. Count & lt;> 0DataGridView1. Rows. RemoveAt (0)
Loop
CodePudding user response:
If you want to remove all, directly. The rowcount=0, don't literally be deletedCodePudding user response:
Similar: DataGridView1 DataSource=null; Can beCodePudding user response:
Problem has been solved, thank youCodePudding user response:
Water not digging a well ha