Monday, 19 May 2014

Difference between RowCreated, RowDataBound ,RowCommand

RowCreated event fires when the html-controls for a row are created. For example the controls you specify in templates, such as a text box or a dropdownlist. Data binding has not yet taken place.

RowDataBound event fires when the data row is bound to the data of the GridView. Can be used to do data manipulation based on the custom condition, or do logical function based on the data for each GridViewRow or to alter the UI of each row based on the  condition.

RowCommand event fires when a button is clicked from inside the GridView Row. Can be used to Select,Insert,Update, Delete, or to do custom operation inside the GridViewRow