Imports Microsoft.VisualBasic
Imports Telerik.WebControls

Namespace MyGridNamespace

    Public Class MyGridExecutionTime
        Inherits RadGrid

        Dim startTime As DateTime

        Protected Overrides Sub OnInit(ByVal e As System.EventArgs)
            startTime = DateTime.Now
            MyBase.OnInit(e)
        End Sub

        Protected Overrides Sub Render(ByVal writer As System.Web.UI.HtmlTextWriter)
            MyBase.Render(writer)

            Dim time As String = (DateTime.Now - startTime).ToString()

            writer.RenderBeginTag("span")
            writer.Write("Execution time: " + time)
            writer.RenderEndTag()
        End Sub

    End Class
End Namespace
