Aspetta socio, non avevo letto che ti andava bene anche troncare la stringa.
Se è così allora la funzione è semplicissima:
codice:
Protected Function TruncateString(ByVal strText As String) As String
If strText.Length > 10 Then
Return strText.Substring(0, 10) + " ..."
End If
Return strText
End Function
che tronca a 10 caratteri la stringa e aggiunge i puntini, poi, nel template della gridView, metti:
codice:
<ItemTemplate>
<asp:Label ID="Label1" runat="server" Text='<%# TruncateString(DataBinder.Eval(Container.DataItem,"nomeCampo").ToString()) %>'></asp:Label>
</ItemTemplate>