ayha1999
asked on
BindingSource error
hi,
I get a compilation error in the follwoing code.
errors:
Error 1 An object reference is required for the non-static field, method, or property 'System.Windows.Forms.Bind ingSource. DataMember .get'
Error 2 An object reference is required for the non-static field, method, or property 'System.Windows.Forms.Bind ingSource. DataSource .get'
code:
private void Form1_Load(object sender, EventArgs e)
{
DBO db = new DBO();
BindingSource.DataMember = "Sample";
BindingSource.DataSource = db;
this.reportViewer1.Refresh Report();
}
How can I solve the problem?
Please help
ayha
I get a compilation error in the follwoing code.
errors:
Error 1 An object reference is required for the non-static field, method, or property 'System.Windows.Forms.Bind
Error 2 An object reference is required for the non-static field, method, or property 'System.Windows.Forms.Bind
code:
private void Form1_Load(object sender, EventArgs e)
{
DBO db = new DBO();
BindingSource.DataMember = "Sample";
BindingSource.DataSource = db;
this.reportViewer1.Refresh
}
How can I solve the problem?
Please help
ayha
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER