本文介绍了如何在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类?
发布评论