First use template field rather than bound filed in Gridview, and bind using
<ItemTemplate>
<ItemTemplate>
<asp:Label ID="lblName" runat="server"
Text=' <%# Eval("NAME").ToString().Length > 25 ? Eval("NAME").ToString().Substring(0, 23)+"..": Eval("NAME")%>'>
</asp:Label>
</ItemTemplate>
No comments:
Post a Comment