RowCreated happens after the line, and all its child controls are created.
RowDataBound occurs after the row (and its controls) is a data binding, i.e. populated with data values.
The answer about what to use really depends on whether data values ββare needed or not. for example, if you want to change the background color of your row based on the value of one of your fields, you will have to use the RowDataBound event. If your logic is data independent, then I donβt think it matters which event you use.
An example of where you should use RowCreated is that if your line had a drop-down list that should be populated with values ββbefore the selected value is bound to the database.
source share