What are some good guidelines to follow when deciding whether or not to databind a control (for example, bind a combobox to a List)?
Are there situations where you should always or never databind a combobox?
How do you decide?
What are some good guidelines to follow when deciding whether or not to databind a control (for example, bind a combobox to a List)?
Are there situations where you should always or never databind a combobox?
How do you decide?
Usually, if the data already exists in a datasource somewhere and that data has the potential to be kept up to date for the application's uses (through the application itself or by other systems/processes), I'll databind the control to that datasource.
I measure it by how much manipulation of the data and its presentation I will be doing.
If it's light manipulation I'll just bind it, or at most do OnRowDataBound.
If I'm extensivelty maipulating the data, I'll spit it to a DataTable, manipulate it and Databind.
I always eventually databind() however.