如何显示GridView绑定到空数据源? (2.0) [英] How to show GridView bound to empty data source? (2.0)
问题描述
Helo All,
问题:当
数据源为空时,GridView控件根本不渲染(页眉/页脚)。 />
我已经看到类似的问题已经发布,但我简直不敢相信
没有简单的解决方案。
我不相信ASP.Net团队采取了这种,一种创新的方法,并且没有任何出路。
有人可以提供建议吗?
谢谢,
Tomasz
" Tomasz Jastrzebski" < oe **** @ nospam.nospamwrote in message
news:%2 **************** @ TK2MSFTNGP04.phx.gbl ...
有人可以提供建议吗?
1)启动互联网浏览器(例如IE,FireFox,Netcape,Opera等)
2)导航到< a rel =nofollowhref =http://www.google.comtarget =_ blank> http://www.google.com
3)在框中输入以下文字:
GridView数据源空白
4)点击按钮
是的,我想我忘了强调简单这个词。
T
" Mark Rae" < ma ** @ markNOSPAMrae.com写信息
新闻:eE ************** @ TK2MSFTNGP06.phx.gbl ...
< blockquote class =post_quotes>
" Tomasz Jastrzebski" < oe **** @ nospam.nospamwrote in message
news:%2 **************** @ TK2MSFTNGP04.phx.gbl ...
>有人可以提供建议吗?
1)启动互联网浏览器(例如IE,FireFox,Netcape,Opera等)
2)导航到< a rel =nofollowhref =http://www.google.comtarget =_ blank> http://www.google.com
3)在框中输入以下文字:
GridView数据源空白
4)点击按钮
也许gridview的emptydatatext属性很简单
http://msdn2.microsoft.com/en-us/lib...ydatatext.aspx
-
问候
John Timney(MVP)
访问我的网站:
http://www.johntimney.com
< a rel =nofollowhref =http://www.johntimney.com/blogtarget =_ blank> http://www.johntimney.com/blog
" Tomasz Jastrzebski" < oe **** @ nospam.nospamwrote in message
news:eW ************** @ TK2MSFTNGP02.phx.gbl ...
是的,我想我忘了强调简单这个词。
T
" Mark Rae < ma ** @ markNOSPAMrae.com写信息
新闻:eE ************** @ TK2MSFTNGP06.phx.gbl ...
< blockquote class =post_quotes>
>" Tomasz Jastrzebski" < oe **** @ nospam.nospamwrote in message
新闻:%2 **************** @ TK2MSFTNGP04.phx.gbl ...
>>有人可以提供建议吗?
1)启动你的互联网浏览器(例如IE,FireFox,Netcape,Opera等)
2)导航到 http://www.google.com
3)在框中输入以下文字:
GridView DataSource空了
4)按下按钮
Helo All,
The problem: GridView control does not render at all (header/footer) when
the data source is empty.
I have seen a similar question posted already, but I just can not believe
there is no simple solution.
I do not believe ASP.Net team took this, sort of, innovative approach and
left no way out.
Could anybody advise?
Thank you,
Tomasz
"Tomasz Jastrzebski" <oe****@nospam.nospamwrote in message
news:%2****************@TK2MSFTNGP04.phx.gbl...
Could anybody advise?1) Launch your internet browser (e.g. IE, FireFox, Netcape, Opera etc)
2) Navigate to http://www.google.com
3) Enter the text below in the box:
GridView DataSource empty
4) Hit the button
Yeah, I think I have forgotten to to emphasize the word SIMPLE.
T
"Mark Rae" <ma**@markNOSPAMrae.comwrote in message
news:eE**************@TK2MSFTNGP06.phx.gbl..."Tomasz Jastrzebski" <oe****@nospam.nospamwrote in message
news:%2****************@TK2MSFTNGP04.phx.gbl...
>Could anybody advise?
1) Launch your internet browser (e.g. IE, FireFox, Netcape, Opera etc)
2) Navigate to http://www.google.com
3) Enter the text below in the box:
GridView DataSource empty
4) Hit the button
Perhaps the emptydatatext property of gridview would be simple enough
http://msdn2.microsoft.com/en-us/lib...ydatatext.aspx
--
Regards
John Timney (MVP)
VISIT MY WEBSITE:
http://www.johntimney.com
http://www.johntimney.com/blog
"Tomasz Jastrzebski" <oe****@nospam.nospamwrote in message
news:eW**************@TK2MSFTNGP02.phx.gbl...Yeah, I think I have forgotten to to emphasize the word SIMPLE.
T
"Mark Rae" <ma**@markNOSPAMrae.comwrote in message
news:eE**************@TK2MSFTNGP06.phx.gbl...>"Tomasz Jastrzebski" <oe****@nospam.nospamwrote in message
news:%2****************@TK2MSFTNGP04.phx.gbl...
>>Could anybody advise?
1) Launch your internet browser (e.g. IE, FireFox, Netcape, Opera etc)
2) Navigate to http://www.google.com
3) Enter the text below in the box:
GridView DataSource empty
4) Hit the button
这篇关于如何显示GridView绑定到空数据源? (2.0)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!