62,046
社区成员
发帖
与我相关
我的任务
分享
<script type="text/javascript">
function s() {
var t = document.getElementById("<%=gv人事基本档案.ClientID%>");
var t2 = t.cloneNode(true)
for (i = t2.rows.length - 1; i > 0; i--)
t2.deleteRow(i)
t.deleteRow(0)
document.getElementById("a").appendChild(t2)
}
window.onload = s
</script>
<asp:BoundField DataField="工号" HeaderText="工号" ReadOnly="True" SortExpression="工号" >
<ControlStyle Width="10px" />
<ItemStyle Width="18px" />
</asp:BoundField>
[/quote]
一般talbe默认是和title(第一个tr,的td宽度对应的),当你的title失去作用时,你就查找第一个起作用的tr的td,不懂你是否懂18px的宽度是多长,你应该参照正常值来设置 <asp:BoundField DataField="工号" HeaderText="工号" ReadOnly="True" SortExpression="工号" >
<ControlStyle Width="10px" />
<ItemStyle Width="18px" />
</asp:BoundField>