【请教】竖排的表格标题,是如何实现的呢?? DataList能否?参见贴子附图:

GoodBoy009 2009-06-13 02:54:10






要求:
表格标题需竖排,右边子表格为自动扩展的列数,(可追加多列)
我套了二个表格,但存在页面缩小时,二个表格的行宽就不统一了,怎么办啊,兄弟们给点实效建议,急。

...全文
136 14 打赏 收藏 转发到动态 举报
写回复
用AI写文章
14 条回复
切换为时间正序
请发表友善的回复…
发表回复
GoodBoy009 2009-06-14
  • 打赏
  • 举报
回复
可用datalist,里用模板列嵌套表格。实现没行两列
---------
谢谢人生如梦兄弟,右边的内容列是自定义扩展的,可能是1-N列。



订货日期再嵌套datalist.
//
可以这样,但关键是二个datalist产生的行高就没办法统一了吧?? 例如说页面缩小时,右边内容列的列数较多,行的内容也长,那这样会改变所在行的高度。
GoodBoy009 2009-06-14
  • 打赏
  • 举报
回复
DetailsView的控件 可以实现竖标题,但如何也同时显示多条记录呢
需求需要右边的表格是多条记录呀。。
wuyq11 2009-06-14
  • 打赏
  • 举报
回复
可用datalist,里用模板列嵌套表格。实现没行两列
订货日期再嵌套datalist.
GoodBoy009 2009-06-14
  • 打赏
  • 举报
回复
GoodBoy009 2009-06-14
  • 打赏
  • 举报
回复


<table id="CompareTable" width="100%" border="0" cellspacing="0" cellpadding="0" >
<tr>
<td align="right" style="width:100px;height:450px">
<table border="0" cellspacing="0" cellpadding="0" class="h_yuding3" align="center">
<tr>
<td width="100" align="right" class="HDTAB31" style="height: 30px">
订货日期:</td>
</tr>
<tr>
<td align="right" class="HDTAB31" style="height: 30px">
订货日期:</td>
</tr>
<tr>
<td align="right" class="HDTAB31" style="height: 30px">
订货日期:</td>
</tr>
<tr>
<td align="right" class="HDTAB31" style="height: 30px">
订货日期:<br>
(每天)</td>
</tr>
<tr>
<td align="right" class="HDTAB31" style="height: 30px">
订货日期:</td>
</tr>
<tr>
<td align="right" class="HDTAB31" style="height: 30px">
订货日期:</td>
</tr>
<tr>
<td align="right" class="HDTAB31" style="height: 30px">
订货日期:</td>
</tr>
<tr>
<td align="right" class="HDTAB31" style="height: 240px">
订货日期:</td>
</tr>
</table>

<td valign="top" style="width:600px;height:450px">

<table width="600px" height="450px" border="0" cellspacing="0" cellpadding="0" class="h_yuding3" align="center">
<tr>
<td align="left" class="HDTAB33" >
2009-6-15(一) 
</td>
</tr>
<tr>
<td align="left" class="HDTAB33" >
<span id="HotelNameSpan_0">订货日期</span>  
<input type="button" id="ase2" value="重选日期" style="background: #0078bd; color: #ffffff;
border: none; padding: 3px 0px 1px;" onclick="openSubAccountsSetEdit(0, '0', '2009-6-15')"/></td>
</tr>
<tr>
<td align="left" class="HDTAB33" >
<span id="roomNameSpan_0">订货日期</span>  
</td>
</tr>
<tr>
<td align="left" class="HDTAB33" >
<span id="hanzaoSpan_0">无</span> 
</td>
</tr>
<tr>
<td align="left" class="HDTAB33" >
订货日期:<span id="roomjiageSpan_0">420</span>我们 
</td>
</tr>
<tr>
<td align="left" class="HDTAB33" >
<span id="roomshuSpan_0">订货日期</span> 
</td>
</tr>
<tr>
<td align="left" class="HDTAB33" >
  
订货日期
</td>
</tr>
<tr>
<td align="left" class="HDTAB33" >
<div id="DIVxiangmu_0">
<input size="9" name="xiangmu0" value="单位" readonly class="wukuang">:<input size="3" name="fenshu0" value="0" onclick="this.select()" onKeyUp="changezongjia()"> *<input size="2" name="dujia0" value="50" readonly class="wukuang" ><input size="5" name="danwei0" value="单位" readonly class="wukuang"> <br>
<span style="color: #ff0000;">订货日期</span></div> </td>
</tr>
</table>


</td>




</table>




按五楼的兄弟提示,我改了一下,但左右二个欠套表格的行宽也不一致了,晕。。。怎么办呢。如下图。。
BernardSun 2009-06-14
  • 打赏
  • 举报
回复
有个DetailsView的控件,你可以试一下
Mark2Win 2009-06-14
  • 打赏
  • 举报
回复
5楼正解
GoodBoy009 2009-06-14
  • 打赏
  • 举报
回复
dataList ? RepeatDirection="vertical" ,这里是记录竖排,并非标题呀?

那如何实现竖标题呢??
Study_Work_2009 2009-06-13
  • 打赏
  • 举报
回复
可以用dataList,设一下RepeatDirection="vertical"
cpio 2009-06-13
  • 打赏
  • 举报
回复
或者它上一层设置了宽度也行,宽度最好是绝对宽度,不要用百分比
cpio 2009-06-13
  • 打赏
  • 举报
回复

<td align="left" class="HDTAB33" style="height: 200px">
<div id="DIVxiangmu_0">



<input size="9" name="xiangmu0" value="单位" readonly class="wukuang">:<input size="3" name="fenshu0" value="0" onclick="this.select()" onKeyUp="changezongjia()"> *<input size="2" name="dujia0" value="50" readonly class="wukuang" ><input size="5" name="danwei0" value="单位" readonly class="wukuang"> <br>






<input size="9" name="xiangmu0" value="单位" readonly class="wukuang">:<input size="3" name="fenshu0" value="0" onclick="this.select()" onKeyUp="changezongjia()"> *<input size="2" name="dujia0" value="68" readonly class="wukuang" ><input size="5" name="danwei0" value="单位" readonly class="wukuang"> <br>




</div>
<span style="color: #ff0000;">订货日期</span></td>


关键是这段没有指定宽度

<td align="left" class="HDTAB33" style="height: 200px">
在这儿指定宽度,或者在下面的div里面指定都可以
malin2670372 2009-06-13
  • 打赏
  • 举报
回复
其实你这样可以直接后台些一方法, 把查询的值绑定到控件上...
malin2670372 2009-06-13
  • 打赏
  • 举报
回复
把你的table 放在datalist的模版中...
配置它的数据源,绑定数据..
GoodBoy009 2009-06-13
  • 打赏
  • 举报
回复


<table id="CompareTable" width="100%" border="0" cellspacing="0" cellpadding="0" >
<tr>
<td align="right" style="width:100px">
<table border="0" cellspacing="0" cellpadding="0" class="h_yuding3" align="center">
<tr>
<td width="100" align="right" class="HDTAB31" style="height: 27px">
订货日期:</td>
</tr>
<tr>
<td align="right" class="HDTAB31" style="height: 27px">
订货日期:</td>
</tr>
<tr>
<td align="right" class="HDTAB31" style="height: 27px">
订货日期:</td>
</tr>
<tr>
<td align="right" class="HDTAB31" style="height: 54px">
订货日期:<br>
(每天)</td>
</tr>
<tr>
<td align="right" class="HDTAB31" style="height: 27px">
订货日期:</td>
</tr>
<tr>
<td align="right" class="HDTAB31" style="height: 27px">
订货日期:</td>
</tr>
<tr>
<td align="right" class="HDTAB31" style="height: 27px">
订货日期:</td>
</tr>
<tr>
<td align="right" class="HDTAB31" style="height: 200px">
订货日期:</td>
</tr>
</table>

<td valign="top" style="width:92%">

<table width="100%" border="0" cellspacing="0" cellpadding="0" class="h_yuding3" align="center">
<tr>
<td align="left" class="HDTAB33" style="height: 27px" >
2009-6-15(一) 
</td>
</tr>
<tr>
<td align="left" class="HDTAB33" style="height: 27px">
<span id="HotelNameSpan_0">订货日期</span>  
<input type="button" id="ase2" value="重选日期" style="background: #0078bd; color: #ffffff;
border: none; padding: 3px 0px 1px;" onclick="openSubAccountsSetEdit(0, '0', '2009-6-15')"/></td>
</tr>
<tr>
<td align="left" class="HDTAB33" style="height: 27px">
<span id="roomNameSpan_0">订货日期</span>  
</td>
</tr>
<tr>
<td align="left" class="HDTAB33" style="height: 53px">
<span id="hanzaoSpan_0">无</span> 
</td>
</tr>
<tr>
<td align="left" class="HDTAB33" style="height: 27px">
订货日期:<span id="roomjiageSpan_0">420</span>我们 
</td>
</tr>
<tr>
<td align="left" class="HDTAB33" style="height: 27px">
<span id="roomshuSpan_0">订货日期</span> 
</td>
</tr>
<tr>
<td align="left" class="HDTAB33" style="height: 27px">
 
<select name="roomDataList$ctl00$ddlSelect" id="roomDataList_ctl00_ddlSelect" onChange="changezongjia()">
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
<option value="6">6</option>
<option value="7">7</option>
<option value="8">8</option>

</select>
订货日期
</td>
</tr>
<tr>
<td align="left" class="HDTAB33" style="height: 200px">
<div id="DIVxiangmu_0">



<input size="9" name="xiangmu0" value="单位" readonly class="wukuang">:<input size="3" name="fenshu0" value="0" onclick="this.select()" onKeyUp="changezongjia()"> *<input size="2" name="dujia0" value="50" readonly class="wukuang" ><input size="5" name="danwei0" value="单位" readonly class="wukuang"> <br>






<input size="9" name="xiangmu0" value="单位" readonly class="wukuang">:<input size="3" name="fenshu0" value="0" onclick="this.select()" onKeyUp="changezongjia()"> *<input size="2" name="dujia0" value="68" readonly class="wukuang" ><input size="5" name="danwei0" value="单位" readonly class="wukuang"> <br>




</div>
<span style="color: #ff0000;">订货日期</span></td>
</tr>
</table>


</td>




</table>

62,074

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术交流专区
javascript云原生 企业社区
社区管理员
  • ASP.NET
  • .Net开发者社区
  • R小R
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

.NET 社区是一个围绕开源 .NET 的开放、热情、创新、包容的技术社区。社区致力于为广大 .NET 爱好者提供一个良好的知识共享、协同互助的 .NET 技术交流环境。我们尊重不同意见,支持健康理性的辩论和互动,反对歧视和攻击。

希望和大家一起共同营造一个活跃、友好的社区氛围。

试试用AI创作助手写篇文章吧