ASP.NET Gridview编辑模板 [英] ASP.NET Gridview edit template

查看:64
本文介绍了ASP.NET Gridview编辑模板的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好
我有一个gridview用于编辑其中的项目,但是当我按下 Edit 按钮时,gridview的宽度会增加,并且由于gridview位于div之外而无法看到gridview的右侧条
任何解决方案?

Hi guys
I have a gridview for editing the items inside it, but when I press the Edit butoon the gridview width increases and right strip of t he gridview cannot be seen because it is outside the div
any solution?

推荐答案



修复所有编辑项目的宽度:

Hi,

fix all edit item width:

<asp:templatefield headertext="Category Name" xmlns:asp="#unknown"><itemtemplate><![CDATA[<%#Eval("CATEGORY_NAME")%>]]></itemtemplate>
            <edititemtemplate>
                <asp:textbox id="txtCatName" width="100px" runat="server" text="<%#Bind("CATEGORY_NAME") %>"></asp:textbox></edititemtemplate>
            </asp:templatefield>



修复命令字段宽度:



fix command field width:

<asp:commandfield showeditbutton="True" headerstyle-width="100px" xmlns:asp="#unknown" />


在您可以指定的列的模板字段中--->
in template field of columns you can specify--->
ControlStyle-Width=''size''


尝试放置相对纵坐标,而不是绝对坐标.
Try to put relative co ordinates, instead of absolute.


这篇关于ASP.NET Gridview编辑模板的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆