Pastebin is 300% more awesome when you are logged in. Sign Up, it's FREE!
Guest

Untitled

By: a guest on May 15th, 2013  |  syntax: None  |  size: 0.31 KB  |  hits: 22  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. TextBox.DataBindings.Add(new Binding("Text", ListBox, "SelectedValue.name"));
  2.        
  3. TextBox.DataBindings.Add(new Binding("Text", ListBox.SelectedValue, "name"));
  4.        
  5. textBox1.DataBindings.Add(new Binding("Text", listBox1, "selectedvalue"));
  6.        
  7. if (textBox1.DataBindings.Count == 0) {
  8.     // OK to data bind textBox1.
  9. }