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

Total Post:19

Points:133
C# 
C#
 6555  View(s)
Ratings:
Rate this:
Hi Expert, 

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

Thanks in advance. 
  1. Post:604

    Points:4228
    Re: how can I remove all rows of datagridview and datatable in c#?

    Hi,


    Try this,

    For datagrideview:

    dataGridView1.Rows.Clear();

    For datatable:

    datatable.Rows.Clear();

Answer