如何在单击按钮时找到EmptyDataTemplate控件. [英] how to find EmptyDataTemplate controls on button click.

查看:99
本文介绍了如何在单击按钮时找到EmptyDataTemplate控件.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



单击按钮时如何查找EmptyDataTemplate控件.
实际上,我必须在加载时将EmptyDataTemplate cotrols的可见性设置为false
并且必须在添加新按钮时将EmptyDataTemplate控件的可见性设置为true.


谢谢
Manisha

Hi,

How to find EmptyDataTemplate controls on button click.
actualy i have to set visiblility of EmptyDataTemplate cotrols false on load
and have to set visiblility of EmptyDataTemplate controls true on add new button.


Thanks
Manisha

推荐答案

如果它是一个空的数据模板,要隐藏什么?它已经是一个已定义的模板,如果数据源中没有数据或将其隐藏,该模板将是可见的.您不需要为此编写任何可见性代码.

在这里查看: MSDn:GridView.EmptyDataTemplate属性 [ ^ ]
当绑定到控件的数据源不包含任何记录时,将在GridView控件中显示空数据行.您可以使用EmptyDataTemplate属性为空数据行定义自己的自定义用户界面(UI).
If it''s a emptydatatemplate, what''s in to hide? It''s already a defined template that would be visible if no data in datasource or else hidden. You don''t need to write any visibility code for it.

Look here: MSDn: GridView.EmptyDataTemplate Property [^]
The empty data row is displayed in a GridView control when the data source that is bound to the control does not contain any records. You can define your own custom user interface (UI) for the empty data row by using the EmptyDataTemplate property.


这篇关于如何在单击按钮时找到EmptyDataTemplate控件.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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