看板C_Sharp
标 题[问题] GridView使用Footertemplate一问
发信站批踢踢实业 (Wed Jun 24 00:40:18 2009)
转信站ptt2!news.ntu!ptt
我要使用gridview新增资料列
但在使用databind的方式下
如果资料是空的
footerTamplate会找不到
有使用过网路上教学用的 显示标题列的方式
但我的问题在於我的GridView里都是用template
ex. Itemtemplate edittemplate footertemplate
而且包含textbox label checkbox dropdownlist..
用网路上那个方法 大概当查询资料库为空时
填入一个空的row 并且清除cell...然後columnspan...
我template中有用到<% bind()> 会有错误无法正常做到显示标题列的功能
请问有人有遇过这样的问题吗 能否指点一下方向
感谢~~
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 219.84.0.252
1F:推 horngsh:select捞资料时用select field1 as name1,field2 as name2 06/24 04:11
2F:→ star1231:请问h大您的意思是 用这形式的语法即可当无资料显示标题? 06/24 08:54
3F:推 horngsh:name1,name2为别名, 会自动填入当作标题名称, 很好用 06/28 09:15