如何在gridview中将自定义属性添加到asp Boundfiled类?

编程入门 行业动态 更新时间:2024-10-08 04:26:15
本文介绍了如何在gridview中将自定义属性添加到asp Boundfiled类?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

您好, 我需要帮助将自定义属性添加到gridview中的asp绑定字段。任何人都可以帮我解决这个问题。为了更加清晰,请参阅下面的代码。 < asp:GridView ID =GridView2runat =server> < ;列> < asp:BoundField DataField =idHeaderText =Ids mycustomproperty =true /> 我想将mycustompropety添加到asp:数据绑定控制器。 可以任何一个帮助吗?

Hello, I need a help to add custom property to asp bound field in gridview. can anyone help me to resolve this issue. for more clarity see the below code. <asp:GridView ID="GridView2" runat="server"> <columns> <asp:BoundField DataField="id" HeaderText="Ids" mycustomproperty="true" /> I want to add mycustompropety to asp:databound contrl. can any one help?

推荐答案

我建​​议你转到 TemplateField 并在里面添加你要绑定的控件。 否则,你可以查看以下文章。 1. GridView中必需的BoundField [ ^ ] 2. 如何在GridView中创建自定义绑定字段 [ ^ ] I would suggest you to go for TemplateField and inside that add whatever control you want to bind. Otherwise, you can look at the below articles. 1. Required BoundField in GridView[^] 2. How to create custom bound fields in GridView[^]

更多推荐

如何在gridview中将自定义属性添加到asp Boundfiled类?

本文发布于:2023-11-11 08:39:39,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1577913.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:自定义   中将   属性   如何在   Boundfiled

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!