English 中文(简体)
电力网观测带宽
原标题:width of grid view boundfield

我不能确定受约束的领域。 下面的标记是否有任何问题。

 <asp:BoundField DataField="UserName" HeaderText="User Name"
                   meta:resourcekey="BoundFieldUNCUserNameResource1">
        <HeaderStyle Width="50%" />
 </asp:BoundField>

“entergraph

请参考图像。 我用以下方法 set。 黄色数字是相应的宽度。 标明的用户名称总是被打碎,即使我设定了大值的宽度(约50%),并设定了Wrap=“false”。

<HeaderStyle Width="20%" Wrap="true" />
<ItemStyle Width="20%" Wrap="true" />
最佳回答

引证:

ItemStyle-Width=“50%”

问题回答

Bound Field:

 <asp:BoundField DataField="UserName" HeaderText="User Name" ItemStyle-Width="50px" />

令人惊讶的是,甚至在现在,即2016年,<代码>。 项目Style-WidthHeaderStyle-Width等特性通常在伙伴关系中被忽视。 http://www.ohchr.org。

有时,它们似乎没有任何标记。

我的解决办法是放弃试图确定这种属性,而我却利用了老的社会保障局:

.AspNet-GridView table tbody tr td:nth-child(1)
{
    /*  Set the width of the 1st GridView column */
    width: 200px;
}
.AspNet-GridView table tbody tr td:nth-child(2)
{
    /*  Set the width of the 2nd GridView column */
    width: 300px;
}

I am also facing this problem today. What i got is you must define ur width in css class & called that css class in boundfeild. e.g.

HeaderStyle-CssClass="width350"

改变一栏宽视带,只添加在受约束地区内

ItemStyle-Width="200"  ItemStyle-Wrap="False"

它为我工作,试图做到这一点。

在尝试了几个没有uck的解决方案之后,我得以在该项目中增加一个盒子。 诸如头盔——CsssClass和Alpha-CssClass属性等种子必须确定:

    <asp:BoundField DataField="Name" HeaderText="Name" HeaderStyle-CssClass="Name" ItemStyle-CssClass="Name" />




相关问题
Anyone feel like passing it forward?

I m the only developer in my company, and am getting along well as an autodidact, but I know I m missing out on the education one gets from working with and having code reviewed by more senior devs. ...

How to Add script codes before the </body> tag ASP.NET

Heres the problem, In Masterpage, the google analytics code were pasted before the end of body tag. In ASPX page, I need to generate a script (google addItem tracker) using codebehind ClientScript ...

Transaction handling with TransactionScope

I am implementing Transaction using TransactionScope with the help this MSDN article http://msdn.microsoft.com/en-us/library/system.transactions.transactionscope.aspx I just want to confirm that is ...

System.Web.Mvc.Controller Initialize

i have the following base controller... public class BaseController : Controller { protected override void Initialize(System.Web.Routing.RequestContext requestContext) { if (...

Microsoft.Contracts namespace

For what it is necessary Microsoft.Contracts namespace in asp.net? I mean, in what cases I could write using Microsoft.Contracts;?

Separator line in ASP.NET

I d like to add a simple separator line in an aspx web form. Does anyone know how? It sounds easy enough, but still I can t manage to find how to do it.. 10x!

热门标签