Click here to Skip to main content
15,913,836 members
Please Sign up or sign in to vote.
1.00/5 (3 votes)
See more:
Hello All
I Want to Change Grid View Button Field from Link To Label.
How i Can do that Plz
Posted
Updated 13-Aug-13 20:58pm
v3
Comments
VishwaKL 14-Aug-13 1:58am    
Please Elaborate your question with problem description
ahmed hussein khazal 14-Aug-13 2:07am    
when in use button field in grid view i should choose link or image or button i need use label
how can do that plz

1 solution

If you want to use label in grid view you can't use button field you have to use item template in grid view like this:

XML
<Columns>
  <asp:TemplateField HeaderText="Label" ItemStyle-Width="50px">
    <ItemTemplate>
      <asp:Label ID="lbl" runat="server" Text="Your Text" ></asp:Label>
    </ItemTemplate>
  </asp:TemplateField>
</Columns>




Accept as answer and vote if solve your problem.
 
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