简体   繁体   中英

how to clean datagridview in C# - but stay with the originals columns header

i have DatagridView in my C# program and i want to clean the grid

(that the grid will be empty)

i try dataGridView1.DataSource = null;

but it clean my header columns too

how i can only clean the grid and leave the originals columns ?

thank's in advance

datgrid.rows.clear();

this will be OK..!!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM