New to Telerik UI for ASP.NET AJAX? Download free 30-day trial

PreRender Event

Fired when the server control is about to render to its containing Page object.

Event Parameters

  • (object) sender

    • The control that fires the event
  • (EventArgs) e

    • Does not contain arguments

Attaching the event

In the Markup

<telerik:RadGrid ID="RadGrid1" runat="server" OnPreRender="RadGrid1_PreRender">
</telerik:RadGrid>

In the Code behind

protected void Page_Init(object sender, EventArgs e)
{
    RadGrid1.PreRender += RadGrid1_PreRender;
}
Protected Sub Page_Init(sender As Object, e As EventArgs) Handles Me.Init
    AddHandler RadGrid1.PreRender, AddressOf RadGrid1_PreRender
End Sub

The event handler

protected void RadGrid1_PreRender(object sender, EventArgs e)
{
    //execute some logic
}
Protected Sub RadGrid1_PreRender(ByVal sender As Object, ByVal e As EventArgs)
    'execute some logic
End Sub

See Also

In this article