Am I missing the point here, I don’t see how this is any better than just assigning the Text property of a Label directly?
//class variables
Binding stateBinding;
MyRowType rowForDataBinding;
ChangeBoundData()
{
rowForDataBinding = GetNewRow();
lblStatus.DataBindings.Remove(temp);
temp = lblState.DataBindings.Add("Text", rowForDataBinding , "State");
}
If you are binding on a row-by-row basis, the amount of benefit is negligible. However, let’s say you want to bind a database table to a data grid. Suddenly, the one line of binding code minimizes a ton of effort.
I’ve gone back and forth on the appropriateness of data-binding, but from what I can tell, the primary benefit is code reduction. The less code you have to write, the less code you have to fix.