日期:2014-05-17  浏览次数:20345 次

Listview如何自定义每列的宽度与整个表的宽度呢
以下是我的代码,我都写了 <table width="2900px">,但是预览的时候,还是自适应整个显示器的宽度, 好奇怪. 还有如何自定义每列的宽度呢,恳请大师们多指点,谢谢.

<asp:ListView ID="ListView1" runat="server">
  <LayoutTemplate>
  <table width="2900px">
  <thead>
  <tr>
  <th>ID</th>
  <th>业务类型</th>
  <th>订单编号</th>
  <th>加工点</th>
  <th>存货编号</th>
  <th>存货名称</th>
  <th>规格型号</th>
  <th>单位</th>
  <th>工程图版次</th>
  <th>客户型号</th>
  <th>包装描述</th>
  <th>订单日期</th>
  <th>计划到货日期</th>
  <th>计划下达日期</th>
  <th>数量</th>
  <th>添加</th>
  <th>删除</th>  
  <th>更新</th>
  </tr>
  </thead>
  <tbody>
  <asp:PlaceHolder runat="server" ID="itemPlaceholder" />
  </tbody>
  </table>
  </LayoutTemplate>

------解决方案--------------------
用%试试
------解决方案--------------------
直接设置宽度和高度,在相应标签中添加height = “值” weith= ‘值’