html中后台动态绑定数据表格存在空白单元格问题
来源:互联网 发布:电脑闹钟提醒软件 编辑:程序博客网 时间:2024/06/06 09:20
因为要做一个客户管理系统,在设置表格的时候在表格样式的时候,因为对table标签的相关属性不是很了解,出现一些小的波折
先记录下这个比较好看的table样式
#mytable { padding: 0; margin-left:10px; border:1px solid #C8D2D7; } caption { padding: 0 0 5px 0; width: 700px; font: italic 11px; text-align: right; } th { font: bold 14px; color:White; border: 1px solid #C8D2D7; text-align: left; background:url(../Images/theadbg.png) repeat-x; height:32px;} td { border-right: 1px solid #C8D2D7; border-bottom: 1px solid #C8D2D7; background: #fff; font-size:11px; padding: 2px 6px 2px 5px; color: #4f6b72; }出现的问题:后台数据是通过repeater动态绑定的,在绑定数据的时候因为有些数据为空,以至于很多单元格内没有任何内容
在IE下表格显示成:
解决的方法是在绑定的字段后面加上
<td> <%#Eval("proname")%> </td>
这样就能正常显示了
表格图片:
<table cellspacing="0" id="mytable" style="width:100%"> <thead> <tr class="Admin_Table_Title"> <th style="width: 10%;"> 操作 </th> <th style="width: 7%;"> 客户名 </th> <th style="width: 8%;"> 咨询项目 </th> <th style="width: 10%;"> 咨询医师 </th> <th style="width: 8%;"> 预约项目 </th> <th style="width: 13%;"> 预约时间 </th> </tr> </thead> <tr> <td> <input type="checkbox" value='4' name="CheckMes" /> <a title="查看详细信息.." href='AddConsult.aspx?CID=4'><img src="Images/LookMes.gif"/></a> </td> <td> 王三 </td> <td> </td> <td> 所有 </td> <td> </td> <td> 2011-10-20 </td> </tr> <tr> <td> <input type="checkbox" value='2' name="CheckMes" /> <a title="查看详细信息.." href='AddConsult.aspx?CID=2'><img src="Images/LookMes.gif"/></a> </td> <td> df </td> <td> 双眼皮 </td> <td> 所有 </td> <td> 后的间空格 </td> <td> 2011-10-14 </td> </tr> </table>
- html中后台动态绑定数据表格存在空白单元格问题
- 关于JQuery获取表格中任意单元格的数据问题
- 把xml数据绑定到html表格中
- 把xml数据绑定到html表格中
- IE9下 奇葩的表格空白单元格问题
- 关于前台合并获取后台动态table中数据相同的单元格的问题;th td合并
- C#中DatagridView单元格动态绑定控件
- winform中DatagridView单元格动态绑定控件
- 表格边框显示--关于html table单元格无数据不显示问题
- 在静态HTML页面中动态显示表格数据
- PHP动态加载html文件之后<head>中内容全部移动到<body>中导致页面头部存在空白
- easyui动态加载表格并绑定数据
- HTML中动态生成内容的事件绑定问题
- HTML中动态生成内容的事件绑定问题
- HTML中动态生成内容的事件绑定问题
- 根据后台数据动态生成表格
- Aspose表格中单元格写入问题
- ASP.NET GirdView后台动态绑定数据
- bus error的解决方法
- iOS UIControl 几个事件的说明
- 求数组的子数组之和的最大值
- dll中多线程使用回调函数
- ArcGIS资料
- html中后台动态绑定数据表格存在空白单元格问题
- 实现Profile购物车的匿名用户迁移
- UIPageControl背景
- UIViewAnimation动画与Core Animation的CATransition类动画
- Could not load file or assembly "xxx" or one of its dependencies. The system cannot find the file sp
- 树-AVL树
- 守护线程、非守护线程简介和addShutdownHook方法使用
- Siebel Error: Unable to find definition for component CommOutboundMgr. (SBL-SRQ-0013)
- 截屏 发送邮件