简体   繁体   English

如何使用visual studio在VB.net中清除/刷新DataBind

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

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? 显示后如何清除VisaDG表?有人可以帮帮我吗?

If you want to clear the gridview. 如果要清除gridview。 The you can do this: 你可以这样做:

VisaDG.DataSource = nothing
VisaDG.DataBind()

EDIT 编辑

Have you tried this? 你试过这个吗?

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM