Data Binding Events for Data-Bound Controls in ASP.Net

ASP.Net Data Binding Control Event and its Typical Use

DataBinding:
This event is raised by data-bound controls before the PreRender event of the containing control (or of the Page object) and marks the beginning of binding the control to the data.

RowCreated (GridView)
ItemCreated (DataList,DetailsView, SiteMapPath,DataGrid, FormView,Repeater):

Use this event to manipulate content that is not dependent on data binding. For example, at run time, you might programmatically add formatting to a header or footer row in a GridView control.

RowDataBound (GridView)
ItemDataBound (DataList,SiteMapPath, DataGrid,Repeater):

When this event occurs, data is available in the row or item, so you can format data or set the FilterExpression property on child data source controls for displaying related data within the row or item.

DataBound:
This event marks the end of data-binding operations in a data-bound control.
In a GridView control, data binding is complete for all rows and any child controls. Use this event to format data bound content or to initiate data binding in other controls that depend on values from the current control's content.
Tags: , , , , ,
Hot on Web:


About author