Code behind Partial Class _default Inherits System.Web.UI.Page Protected Sub GridView1_RowDataBound(ByVal sender As Object, ByVal e As GridViewRowEventArgs) If e.Row.RowType = DataControlRowType.DataRow Then ‘character count If DataBinder.Eval(e.Row.DataItem, “description”).ToString.Length >= 175 Then e.Row.Cells(3).Text = + DataBinder.Eval(e.Row.DataItem, “description”).ToString.Substring(0, 175) + e.Row.Cells(3).ToolTip = DataBinder.Eval(e.Row.DataItem, “description”).ToString Else e.Row.Cells(3).Text = + DataBinder.Eval(e.Row.DataItem, “description”).ToString End If End If End Sub End Class
Archive for January 3, 2013