Advertise with us

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

Posted by  Lady Bird Johnson
C# 
C#
 7021  View(s)
Ratings:
Rate this:
Hi Expert, 

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

Thanks in advance. 
  1. 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