# Telerik RadGrid lifecycle

> caption Table 1: Telerik RadGrid lifecycle phases

| **Phase**                              | **What does Telerik RadGrid do**                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| -------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Initialize**                         | Telerik RadGrid initializes the settings needed during the lifetime of the incoming Web request. See [Handling Inherited Events](https://msdn.microsoft.com/en-us/library/aa720048\(v=vs.71\).aspx).                                                                                                                                                                                                                                                                                                                                                            |
| **Load view state**                    | At the end of this phase, the **ViewState** property of Telerik RadGrid is automatically populated as described in [Maintaining State in a Control](https://msdn.microsoft.com/en-us/library/aa720269\(v=vs.71\).aspx).                                                                                                                                                                                                                                                                                                                                         |
| **Process postbackdata**               | Process incoming form data and update properties accordingly. See [Processing Postback Data](https://msdn.microsoft.com/en-us/library/aa719775.aspx).                                                                                                                                                                                                                                                                                                                                                                                                           |
| **Load**                               | Perform actions common to all requests, such as setting up a database query if you are using simple data binding described in the [Simple Data-binding](https://www.telerik.com/products/aspnet-ajax/documentation/controls/grid/data-binding/server-side-binding/simple-data-binding) topic. At this point, server controls presented in the controls tree are created and initialized, the state is restored, and form controls reflect client-side data. See [Handling Inherited Events](https://msdn.microsoft.com/en-us/library/aa720048\(v=vs.71\).aspx). |
| **Send postback change notifications** | Telerik RadGrid raises change events in response to state changes between the current and previous postbacks. See [Processing Postback Data](https://msdn.microsoft.com/en-us/library/aa719775.aspx).                                                                                                                                                                                                                                                                                                                                                           |
| **Handle postback events**             | Telerik RadGrid handles the client-side event that caused the postback and raises the appropriate events on the server. See [Capturing Postback Events](https://msdn.microsoft.com/en-us/library/aa720472\(v=vs.71\).aspx).                                                                                                                                                                                                                                                                                                                                     |
| **Prerender**                          | Perform any updates before the output is rendered. Any changes made to the state of Telerik RadGrid in the prerender phase can be saved, while changes made in the rendering phase (two steps further) are lost. See [Handling Inherited Events](https://msdn.microsoft.com/en-us/library/aa720048\(v=vs.71\).aspx).                                                                                                                                                                                                                                            |
| **Save state**                         | The **ViewState** property of a control is automatically persisted to a string object after this stage. This string object is sent to the client and back as a hidden variable. For improving efficiency, a control can override the **SaveViewState** method to modify the **ViewState** property. See [Maintaining State in a Control](https://msdn.microsoft.com/en-us/library/aa720269\(v=vs.71\).aspx).                                                                                                                                                    |
| **Render**                             | Telerik RadGrid generates output to be rendered to the client. See [Rendering an ASP.NET Server Control](https://msdn.microsoft.com/en-us/library/aa338806\(v=vs.71\).aspx).                                                                                                                                                                                                                                                                                                                                                                                    |
| **Dispose**                            | Perform any final cleanup before Telerik RadGrid is torn down. References to expensive resources such as database connections must be released in this phase. See [Methods in ASP.NET Server Controls](https://msdn.microsoft.com/en-us/library/aa720294\(v=vs.71\).aspx).                                                                                                                                                                                                                                                                                      |
| **Unload**                             | Perform any final cleanup before the control is torn down.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |

## See Also

* [Event sequence](https://www.telerik.com/products/aspnet-ajax/documentation/controls/grid/control-lifecycle/event-sequence)
* [Optimizing ViewState usage](https://www.telerik.com/products/aspnet-ajax/documentation/controls/grid/performance/optimizing-viewstate-usage)
* [Rebind Grid with EnableViewState = false](https://www.telerik.com/products/aspnet-ajax/documentation/controls/grid/performance/rebind-grid-with-enableviewstate---false)
