datagrid没有占满<td>的宽度,两边分别多出了一列空的,效果可以在附件中看到,用到的代码如下:
<table width="100%">
<tr>
<td height="133">
<w:dataGrid id="dataGrid1" align="left" paged="false" rows="5" var="data"
header="false" remoteSort="false" border="false" autoExpandColumn="2" stripeRows="true">
<w

utputColumn value="#{data.mail.formatSn}"
header="编号" width="100"/>
<w

utputColumn align="left" value=" <span style='color: red;'> #{data.mail.status == 5 ? ('新') : ('')}
</span> <a class='subMenuLink'
href='javascript:var first = dataGridVar_ds.lastOptions.params.start; window.location.href="handleEdit.faces?mailId=#{data.mail.id}&first="+ first;''
>#{data.mail.title}</a>"
header="主题" width="200"/>
<w

utputColumn id="status"
header="状态" width="100"/>
<w

utputColumn value="#{data.mail.createTime}"
header="上传时间" width="150" c/>
</w:dataGrid>
</td>
</tr>
</table>