Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Jan 19, 2010 07:13 AM by Mohammed Askar
Jun 03, 2006 10:02 AM|LINK
Jun 03, 2006 04:13 PM|LINK
RowCreated is fired when the html-controls for a row are created. For example the controls you specify in templates, such as a textbox or a dropdownlist. Databinding has not yet taken place.
After RowDataBound the databound-controls are filled with the actual values. For example a bound SelectedValue property of a DropDownList is set. In this eventhandler you could change these values if needed.
Above that you could for example change properties of non-databound controls but this can also be done in the RowCreated eventhandler.
Most of the time I use the DataBound event. The only moment I use the Created event is when I need to populate a DropDownList with Items. Otherwise databinding would fail.
Oct 04, 2007 01:54 AM|LINK
RowCreated is focused on parsing Gridview row's definition and creating the Gridview row's control structure,
RowDataBound is focused on bind data to the row's controls created in the RowCreated.
Also RowCreated is invoked automatically in both init and postback case, but RowDataBound is only invoke when the DataBind is called.
Jan 19, 2010 07:13 AM|LINK