【问题标题】:I want to change the position of gridView from default bottom to top in right side我想将gridView的位置从默认的底部更改为右侧的顶部
【发布时间】:2018-01-14 06:16:13
【问题描述】:

我已经尝试过 PagerStyle-Horizo​​ntalAlign="Right" PagerStyle-VerticalAlign="Top" 但它不起作用

这是gridview代码

【问题讨论】:

  • 这些属性调整了gridview中pager控件的位置。这是您想要的,还是整个网格视图在整个页面中的位置?不清楚。
  • 您为什么要还原编辑?它改进了帖子。

标签: c# asp.net


【解决方案1】:

在 Theme.css 中

.GridPosition
    {
        position:fixed;
        right:50px;
        top:50px;   
    }

在 default.aspx 中

<html xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">
    <link rel="stylesheet" type="text/css" href="Theme.css" />
    </head>
    <body>

    <form id="form1" runat="server">
    <asp:GridView ID="GridViewTrain" runat="server" EnableModelValidation="True" onrowdeleting="GridView_Train_RowDeleting" onselectedindexchanging="GridView_SelectedIndexChanging"class="GridPosition">
        <Columns>
            <asp:CommandField ShowDeleteButton="True" />
            <asp:CommandField SelectText="Edit" ShowSelectButton="True" />
        </Columns>
       </asp:GridView>
    </form> 
    </body>
    </html>

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2012-05-02
    • 2016-02-18
    • 1970-01-01
    • 2021-12-03
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-07-16
    相关资源
    最近更新 更多