如何将“编辑”按钮移动到“详细信息视图”顶部?

发布于 2024-12-09 11:32:31 字数 568 浏览 1 评论 0原文

我有一个绑定到 SqlDataSource 的 DetailsView。它还有一个编辑命令字段,显示在自动生成的行的底部。

<asp:DetailsView ID="DetailsView1" runat="server"  
            ForeColor="#333333" GridLines="None" Height="50px" Width="150px" 
            DataSourceID="SqlDataSource2" Caption="System Parameters" CellSpacing="2">           
            <Fields>
                <asp:CommandField ShowEditButton="True"  />
            </Fields>           
</asp:DetailsView> 

有超过 50 列,所以我不想手动添加绑定字段。

如何将“编辑”按钮移动到“详细信息视图”(第一行)的顶部?

谢谢,

I have a DetailsView which is bound to a SqlDataSource. It also has an Edit CommandField which appears on the bottom of the autogenerated rows.

<asp:DetailsView ID="DetailsView1" runat="server"  
            ForeColor="#333333" GridLines="None" Height="50px" Width="150px" 
            DataSourceID="SqlDataSource2" Caption="System Parameters" CellSpacing="2">           
            <Fields>
                <asp:CommandField ShowEditButton="True"  />
            </Fields>           
</asp:DetailsView> 

There are over 50 columns so I wouldn't like to add the bound fields manually.

How would that be possible to move the Edit button on top of the DetailsView (first row)?

Thanks,

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

戒ㄋ 2024-12-16 11:32:32

似乎有点不清楚,但一个可能的解决方案是给编辑按钮一个相对位置。然后使用顶部 (-) 或底部 (+) 功能将其移至顶部。

Seems a bit unclear, but a possible solution would be to give the edit button a relative position. Then move it to the top by using the top (-) or bottom (+) functions.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文