Reputation: 441
what is assembly reference for BindingContext? i use this code in c# win app, but it gives me error
txt_barcode_num_pri.BindingContext .ToString (TextBox).UpdateSource();
if (txt_barcode_num_pri.GetBindingExpression(c).HasError)
Upvotes: 0
Views: 169
Reputation: 16698
Use this BindingContext Reference
You can find BindingContext
under Namespace System.Windows.Forms
in Assembly, System.Windows.Forms
(in System.Windows.Forms.dll)
Try using the code this way:
var bindingContext = txt_barcode_num_pri.BindingContext[dataSource];
Where dataSource is the DataSource
object.
OR
var bindingContext = txt_barcode_num_pri.BindingContext[dataSet, "DataMember"];
Upvotes: 1