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
- Page.Load
- NeedDataSource
- ItemCreated for each item
- ItemDataBound for each item
- Page.PreRender
Normal postback from a control outside of RadListView
- ItemCreated for each item
- Page.Load
- Postback Events
- 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)
- ItemCreated for each item
- Page.Load
- ItemCommand
- SelectedIndexChanged
- NeedDataSource
- Other postback events
- Page.PreRender
On edit/update/insert/delete/cancel action or paging/sorting operation
- ItemCreated for each item
- Page.Load
- ItemCommand
- ItemEditing/ItemUpdating/ItemInserting/ItemDeleting/ItemCancelling, ItemEdited/ItemUpdated/ItemInserted/ItemDeleted/ItemCancelledorPageIndexChanged/PageSizeChanged/Sorting/ItemCommand
- NeedDataSource
- ItemCreated for each item
- ItemDataBound for each item
- 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
- Page.Load
- NeedDataSource
- ItemCreated for each item
- ItemDataBound for each item
- Page.PreRender
Normal postback from a control outside of ListView
- ItemCreated for each item
- ItemDataBound for each item
- Page.Load
- NeedDataSource
- Postback Events
- Page.PreRender
On server selection from LinkButton/PushButton/ImageButton with CommandName Select or Deselect (part of the RadListView body)
- ItemCreated for each item
- ItemDataBound for each item
- Page.Load
- NeedDataSource
- ItemCommand
- SelectedIndexChanged
- Other postback events
- Page.PreRender
On edit/update/insert/delete/cancel action or paging/sorting operation
- ItemCreated for each item
- Page.Load
- NeedDataSource
- ItemCreated for each item
- ItemDataBound for each item
- ItemCommand
- ItemEditing/ItemUpdating/ItemInserting/ItemDeleting/ItemCancelling, ItemEdited/ItemUpdated/ItemInserted/ItemDeleted/ItemCancelledorPageIndexChanged/PageSizeChanged/Sorting/ItemCommand
- NeedDataSource
- ItemCreated for each item
- ItemDataBound for each item
- 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.