即使数据源不返回记录,也显示gridview标头 [英] show the gridview headers even if the datasource doesn't return a record

查看:88
本文介绍了即使数据源不返回记录,也显示gridview标头的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的页面中有一个gridview,即使绑定到它的数据源不从我的sql server数据库返回任何记录(行),我也希望该gridview显示其标题.我还想显示一条消息,通知用户未找到任何记录.

i have a gridview in my page, and i want that gridview display its headers even if the datasource which is bound to it doesn''t return any record(row) from my sql server database. i want also to display a message that inform user that any record wasn''t found.

推荐答案

以下几种解决方案

GridView-在空数据源上显示标头 [
Here couple of solutions

GridView - Show headers on empty data source[^]


这篇关于即使数据源不返回记录,也显示gridview标头的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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