Click here to Skip to main content
15,886,519 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
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?
Posted
v2

1 solution

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[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900