Click here to Skip to main content
15,885,278 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
How to display the first 10 characters in a every gridview colums???
Posted
Comments
ZurdoDev 11-Jan-13 7:51am    
You can return the data that way in SQL.

1 solution

There are few ways to do this.
One is by modifying the ItemTemplate in TemplateField

ASP.NET
<asp:templatefield headertext="Description" xmlns:asp="#unknown">
 <itemtemplate>
      <asp:label id="lblDescription" runat="server">
                Text='<%# Limit(Eval("Description"),10) %>' 
                Tooltip='<%# Eval("Description") %>'>
      </asp:label>      
 </itemtemplate>
</asp:templatefield>
 
Share this answer
 
v2

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