Gets or sets the property on the control to bind to.
[Visual Basic] Public Property PropertyName As String [C#] public string PropertyName {get; set;} [C++] public: __property String* get_PropertyName(); public: __property void set_PropertyName(String*); [JScript] public function get PropertyName() : String; public function set PropertyName(String);
The name of a property to bind to.
The following example resets the PropertyName of a binding.
[Visual Basic]
Private Sub ChangeProperty() Dim t As DataTable ' Assuming a DataTable named "ControlDimensions' exists, with a ' a DataColumn named "Column" containing numeric data. t = DataSet1.Tables("ControlDimensions") ' Bind the control to column1 of the table. TextBox1.Bindings.Add("Height", t, "Column1") ' Change the binding. Dim lb As ListBinding Set lb = TextBox1.Bindings(0) lb.PropertyName = "Width" End Sub
ListBinding Class | ListBinding Members | System.WinForms Namespace