Edit this page

Event Sequence

The API and event sequence of RadListView are quite similar to MS ListView. The sequence of the events is the following:

RadListView 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
  2. Page.Load
  3. Postback Events
  4. Page.PreRender

If a data source was not provided in the initial load, the NeedDataSource event will be fired as if this were the initial page load.

On server selection from LinkButton/PushButton/ImageButton with CommandName Select or Deselect (part of the RadListView body)

  1. ItemCreated for each item
  2. Page.Load
  3. ItemCommand
  4. SelectedIndexChanged
  5. NeedDataSource
  6. Other postback events
  7. Page.PreRender

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

  1. ItemCreated for each item
  2. Page.Load
  3. ItemCommand
  4. ItemEditing/ItemUpdating/ItemInserting/ItemDeleting/ItemCancelling, ItemEdited/ItemUpdated/ItemInserted/ItemDeleted/ItemCancelledorPageIndexChanged/PageSizeChanged/Sorting/ItemCommand
  5. NeedDataSource
  6. ItemCreated for each item
  7. ItemDataBound for each item
  8. Page.PreRender

Calling Rebind()

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

RadListView with EnableViewState set to false

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 ListView

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

On server selection from LinkButton/PushButton/ImageButton with CommandName Select or Deselect (part of the RadListView body)

  1. ItemCreated for each item
  2. ItemDataBound for each item
  3. Page.Load
  4. NeedDataSource
  5. ItemCommand
  6. SelectedIndexChanged
  7. Other postback events
  8. Page.PreRender

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

  1. ItemCreated for each item
  2. Page.Load
  3. NeedDataSource
  4. ItemCreated for each item
  5. ItemDataBound for each item
  6. ItemCommand
  7. ItemEditing/ItemUpdating/ItemInserting/ItemDeleting/ItemCancelling, ItemEdited/ItemUpdated/ItemInserted/ItemDeleted/ItemCancelledorPageIndexChanged/PageSizeChanged/Sorting/ItemCommand
  8. NeedDataSource
  9. ItemCreated for each item
  10. ItemDataBound for each item
  11. Page.PreRender

Calling Rebind()

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

Is this article helpful? No Yes
Thank you for your feedback!

Give article feedback

Tell us how we can improve this article

close
Dummy