one question in vb.net

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • milindalal
    New Member
    • Apr 2008
    • 1

    one question in vb.net

    how to clear datagrid view in vb.net
  • nateraaaa
    Recognized Expert Contributor
    • May 2007
    • 664

    #2
    Originally posted by milindalal
    how to clear datagrid view in vb.net
    What are you using for your datasource? If it is a dataset or datatable just set the control you are using to a new instance.

    Code:
     dataTable = new DataTable(); 
     
    if(dataTable.Rows.Count == 0)
    {
    dataGridView1.DataSource = dataTable;
    }
    Nathan

    Comment

    Working...