如何使没有数据的数据网格? [英] How to make the datagrid with no data?

查看:59
本文介绍了如何使没有数据的数据网格?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

如何在用户单击按钮时使数据网格没有数据.我有一个包含2个按钮的页面,其中一个是加载数据"和清除数据".如果用户单击单击"按钮,则数据网格中的数据将是否消失?使用DataSet.

我在该Click代码中使用了ds.Tables.Clear().请帮助我

hi everyone,

How to make the datagrid with no data when a user click''s the button.I have a page with 2 buttons one is Load Data and Clear Data.If the user click''s the CLick button will the data in the datagrid will disppear or not?Am using DataSet.

I have used ds.Tables.Clear() in that Click code .Please help me

推荐答案

使用
ds.Tables.Clear();


并进一步使用


and further use

DataGrid.Bind();



希望对您有所帮助.



Hope it helps.


这篇关于如何使没有数据的数据网格?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆