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

Events Lifecycle

The API and event sequence of RadDataForm are quite similar to RadListView .The sequence of the events is as follows.

RadDataForm with EnableViewState set to true (default value)

First page load

  1. Page.Load
  2. NeedDataSource
  3. ItemCreated for each item
  4. ItemDataBound for each item
  5. Page.PreRender

Normal postback from a control outside of RadListView

  1. ItemCreated for each item in RadDataForm
  2. Page.Load
  3. Postback Events
  4. Page.PreRender

On edit/update/insert/delete/cancel action or paging/sorting operation

  1. ItemCreated for each item in RadDataForm
  2. Page.Load
  3. ItemCommand
  4. ItemEditing / ItemUpdating / ItemInserting / ItemDeleting / ItemCanceling
  5. ItemEdited / ItemUpdated / ItemInserted / ItemDeleted / PageIndexChanged
  6. NeedDataSource
  7. ItemCreated for each item in RadDataForm
  8. ItemDataBound for each item in RadDataForm
  9. Page.PreRender

Calling Rebind()

Invoking the Rebind() method from a postback event handler of an outside control or RadDataForm will raise the NeedDataSource event. Then the data form items will be recreated and ItemCreated and ItemDataBound events will be raised according to the cases above.

RadDataForm with EnableViewState set to false

First page load

  1. Page.Load
  2. NeedDataSource
  3. ItemCreated for each item in RadDataForm
  4. ItemDataBound for each item in RadDataForm
  5. Page.PreRender

Normal postback from a control outside of RadDataForm

  1. NeedDataSource
  2. ItemCreated for each item in RadDataForm
  3. ItemDataBound for each item in RadDataForm
  4. Page.Load
  5. Postback Events
  6. Page.PreRender

On edit/update/insert/delete/cancel/paging operation

  1. NeedDataSource
  2. ItemCreated for each item in RadDataForm
  3. ItemDataBound for each item in RadDataForm
  4. Page.Load
  5. ItemCommand
  6. ItemEditing / ItemUpdating / ItemInserting / ItemDeleting / ItemCanceling
  7. ItemEdited / ItemUpdated / ItemInserted / ItemDeleted / ItemCancelled / PageIndexChanged
  8. ItemCreated for each item in RadDataForm
  9. ItemDataBound for each item in RadDataForm
  10. Page.PreRender

Calling Rebind()

Invoking the Rebind() method from postback event handler of an outside control or RadDataForm will not raise the NeedDataSource event. Then the data form items will be recreated so the ItemCreated and ItemDataBound events will be raised according to the cases above.

See Also

In this article