# Differences Between ItemCreated and ItemDataBound

Here are some hints which can help you visualize the sequence of the **ItemCreated** and **ItemDataBound** events firing, their specifics and execution lifecycle:

> caption Table 1: Differences between the ItemCreated and ItemDataBound events

| **Question**                             | **Answer**                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| ---------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Is there any data in the item?**       | **ItemCreated** is fired -before- the item is data-bound. Thus, there is no data in the cells' text or input controls yet. In **ItemDataBound** all is available.                                                                                                                                                                                                                                                                                                                  |
| **How often does it fire?**              | **ItemCreated** is fired when grid is binding to data and when grid is binding from the ViewState, hence after each page postback - just before **Load** event occurs. **ItemDataBound** is fired only when grid binds to data. This means that if you need to add controls to a grid item that should fire a postback event, you should: <ol><li>Create the controls in **ItemCreated** event handler</li><li>Bind them to data in **ItemDataBound** (if that's needed)</li></ol> |
| **What about the ViewState management?** | **ItemCreated** should be hooked when you need to modify the controls inside a grid cell. **ItemDataBound** should be wired in order to change the data displayed inside a grid cell and its controls. The changes made in the **ItemCreated** / **ItemDataBound** handlers will be persisted in the **ViewState**.                                                                                                                                                                |

## See Also

* [Event sequence](https://www.telerik.com/products/aspnet-ajax/documentation/controls/grid/control-lifecycle/event-sequence)
* [Telerik RadGrid lifecycle](https://www.telerik.com/products/aspnet-ajax/documentation/controls/grid/control-lifecycle/telerik-radgrid-lifecycle)
* [How to Fire Command Events](https://www.telerik.com/products/aspnet-ajax/documentation/controls/grid/control-lifecycle/how-to-fire-command-events)
