Home > DeveloperSection > Forums > how can I remove all rows of datagridview and datatable in c#?
Lady Bird Johnson
Lady Bird Johnson

Total Post:20

Points:140
Posted on    June-15-2013 1:12 AM

 C# C# 
Ratings:


 1 Reply(s)
 3912  View(s)
Rate this:
Hi Expert, 

how can I remove all rows of datagridview and datatable in c#?

Thanks in advance. 


AVADHESH PATEL

Total Post:604

Points:4228
Posted on    June-15-2013 4:09 AM

Hi,

Try this,

For datagrideview:

dataGridView1.Rows.Clear();

For datatable:

datatable.Rows.Clear();

Don't want to miss updates? Please click the below button!

Follow MindStick