how to clear/refresh DataBind in VB.net using visual studio

Refresh

February 2019

Views

2.2k time

1

Here I draw the table data binding using this code :-

Dim ds As DataSet = New DataSet()
ds.ReadXml(mypath)

VisaDG.DataSource = ds
VisaDG.DataBind()

How to clear the VisaDG table after display it?..Anyone can help me?

1 answers

4

If you want to clear the gridview. The you can do this:

VisaDG.DataSource = nothing
VisaDG.DataBind()

EDIT

Have you tried this?

VisaDG.DataSource=New DataSet()
VisaDG.DataBind()