亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

gridview我自定了列寬 但是在IE上,卻是 列寬是平分的

gridview我自定了列寬 但是在IE上,卻是 列寬是平分的

哆啦的時光機 2018-12-07 07:02:17
部分代碼如下:<asp:GridView ID="GridView1" runat="server" Width="5800px"??? AutoGenerateColumns="False"??? onselectedindexchanged="GridView1_SelectedIndexChanged">? <Columns>? <asp:CommandField ShowSelectButton="True">? <ItemStyle Width="40px" />? </asp:CommandField>? <asp:BoundField DataField="no" HeaderText="工號">? <ItemStyle Width="60px" />? </asp:BoundField>? <asp:BoundField DataField="ha01" HeaderText="姓名" >? <ItemStyle Width="60px" />? </asp:BoundField>? <asp:BoundField DataField="ha02" HeaderText="姓別" >? <ItemStyle Width="60px" />? </asp:BoundField>? <asp:BoundField DataField="ha03" HeaderText="部門" >? <ItemStyle Width="60px" />? </asp:BoundField>? <asp:BoundField DataField="ha04" HeaderText="班組車間" >? <ItemStyle Width="60px" />? </asp:BoundField> ??? <asp:BoundField DataField="ha06" HeaderText="學歷" >? <ItemStyle Width="60px" />? </asp:BoundField>? <asp:BoundField DataField="ha07" HeaderText="民族" >? <ItemStyle Width="60px" />? </asp:BoundField>?<asp:BoundField DataField="ha19" HeaderText="備注" >? <ItemStyle Width="150px" />? </asp:BoundField> -------在VS2008 上顯示,列寬分布是按照width屬性的,但在IE上卻不是這樣子了,好奇怪,我已經設了AutoGeneratecolumns屬性等于false,請高人的指點指點 ? 我感覺源文件都是有寬度變化的,但是呈現出來的卻沒有寬度變化,是不是字段太多了源文件如下:style="width:60px;">初中</td><td style="width:60px;">&nbsp;</td><td style="width:60px;">&nbsp;</td><td style="width:70px;">&nbsp;</td><td style="width:60px;">&nbsp;</td><td style="width:60px;">&nbsp;</td><td style="width:60px;">&nbsp;</td><td style="width:60px;">&nbsp;</td><td style="width:60px;">13407048961</td><td style="width:70px;">&nbsp;</td><td style="width:60px;">362531197812273627</td><td style="width:70px;">1978-12-1 0:00:00</td><td style="width:250px;">江西省撫州市東鄉縣鄧家鄉松湖村下園組12號</td><td style="width:70px;">&nbsp;</td><td
查看完整描述

6 回答

?
楊__羊羊

TA貢獻1943條經驗 獲得超7個贊

和table的布局方式也有關系,css:

自動布局,根據內容大小:

{

  table-layout:auto;

}

固定布局,根據設置的寬高:

{

  table-layout:fixed;

}

查看完整回答
反對 回復 2019-01-21
?
慕桂英3389331

TA貢獻2036條經驗 獲得超8個贊

可以試一下gridview中的column屬性ItemStyle-Width和ItemStyle-Hight可以固定其寬度及高度

查看完整回答
反對 回復 2019-01-21
?
紅顏莎娜

TA貢獻1842條經驗 獲得超13個贊

有沒有列子呀

查看完整回答
反對 回復 2019-01-21
?
千萬里不及你

TA貢獻1784條經驗 獲得超9個贊

<div > ??????? <asp:Panel runat="server" ScrollBars="Both" BorderColor="Blue" ??????????? Border BorderWidth="1px" Width="51%" Height="72px"> ??????????? <asp:GridView runat="server" AutoGenerateColumns="False" ??????????????? Height="62px" Width="499px"> ??????????????? <Columns> ??????????????????? <asp:BoundField HeaderText="工號" ItemStyle-Width="40px"? ?ItemStyle-Height="20px"> ??????????????????????? <ItemStyle Width="40px" /> ??????????????????? </asp:BoundField> ??????????????????? <asp:BoundField HeaderText="姓名" ItemStyle-Width="60px" > ??????????????????????? <ItemStyle Width="60px" /> ??????????????????? </asp:BoundField> ??????????????????? <asp:BoundField HeaderText="姓別" ItemStyle-Width="60px" > ??????????????????????? <ItemStyle Width="60px" /> ??????????????????? </asp:BoundField> ??????????????????? <asp:BoundField HeaderText="部門" ItemStyle-Width="60px" > ??????????????????????? <ItemStyle Width="60px" /> ??????????????????? </asp:BoundField> ??????????????????? <asp:BoundField HeaderText="班組車間" ItemStyle-Width="110px" > ??????????????????????? <ItemStyle Width="60px" /> ??????????????????? </asp:BoundField> ??????????????????? <asp:BoundField HeaderText="學歷" ItemStyle-Width="90px" > ??????????????????????? <ItemStyle Width="40px" /> ??????????????????? </asp:BoundField> ??????????????????? <asp:BoundField HeaderText="民族" ItemStyle-Width="110px" > ??????????????????????? <ItemStyle Width="60px" /> ??????????????????? </asp:BoundField> ??????????????????? <asp:BoundField HeaderText="備注" ItemStyle-Width="200px" >?????????????????? ??????????????????????? <ItemStyle Width="150px" /> ??????????????????? </asp:BoundField> ??????????????? </Columns>?????????????? ??????????? </asp:GridView> ??????? </asp:Panel> ??? </div>

可根據情況調整。。。

查看完整回答
反對 回復 2019-01-21
?
MM們

TA貢獻1886條經驗 獲得超2個贊

你把標題也設置一下寬度。

查看完整回答
反對 回復 2019-01-21
?
桃花長相依

TA貢獻1860條經驗 獲得超8個贊

<asp:GridView runat="server" Width="5800px"?

Width="5800px"? 這么大?

查看完整回答
反對 回復 2019-01-21
  • 6 回答
  • 0 關注
  • 529 瀏覽

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號