2012-04-13 75 views
1

1我的GridView的代碼如下:網格視圖尋呼機風格問題

<asp:GridView runat="server" 
    ID="gvOpenProblems" 
    AutoGenerateColumns="true" 
    BorderColor="Black" 
    OnRowCreated="gvOpenProblems_RowCreated" 
    OnRowDataBound="gvOpenProblems_RowDataBound" 
    HeaderStyle-HorizontalAlign="Center" 
    Width="2000px" 
    AllowPaging="true" 
    PageSize="20" 
    OnPageIndexChanging="gvOpenProblems_PageIndexChanging"> 

    <RowStyle HorizontalAlign="Left" /> 
    <PagerStyle CssClass="gridpager" 
     HorizontalAlign="Left" 
     Width="200px" /> 

和CSS是這樣的:

.gridpager, .gridpager td { 
    text-align: left; 
    color: Green; 
    font-weight: bold; 
    text-decoration: none; 
    border: 0; 
    position: relative; 
    margin-left: auto; 
    margin-right: auto; 
    padding: 0px; 
} 

.gridpager a { 
    color: Red; 
    font-weight: normal; 
} 

能正常工作正常但是當頁面數量超過10,和當我點擊第10頁或第11頁時,所有頁碼都會傳播並退出網格。

Check image

這是一個正常的問題,或者是它的問題與CSS?

+0

您是否可以顯示圖像以將「頁碼傳播和走出網格「? – 2012-04-13 07:00:08

+0

100%的CSS問題。 – 2012-04-13 07:09:01

+0

我想添加圖像,但不能.. – user1181942 2012-04-13 07:16:31

回答

1

問題是,您將寬度設置爲200px。如果您認爲這適用於包含分頁控件的包含表格,則會被原諒,但事實並非如此,TD中包含一個包含&範圍標籤的TD。