BindingSource ?

  • Thread starter Thread starter Jarod
  • Start date Start date
J

Jarod

Hey
I tried to use bindingSource created by wizard from dataGridView. I set it
to bind data from my class I have public property "Source" that returns list
of objects with property of "SampleText". Wizard created bindingDataSource
object, and a column in my dataGridView but when I run this it doesn't seems
to execute any data. I tried to bind dataGridView.DataSource to my object
manually it works perfectly ;) I also tried to bind dataGridView.DataSource
= myBindingSource; but it doesn't work at all.
Jarod
 
"Jarod" <[email protected]> a écrit dans le message de %[email protected]...

| I tried to use bindingSource created by wizard from dataGridView. I set it
| to bind data from my class I have public property "Source" that returns
list
| of objects with property of "SampleText". Wizard created
bindingDataSource
| object, and a column in my dataGridView but when I run this it doesn't
seems
| to execute any data. I tried to bind dataGridView.DataSource to my object
| manually it works perfectly ;) I also tried to bind
dataGridView.DataSource
| = myBindingSource; but it doesn't work at all.

You must connect the DataSource property of the BindingSource to a valid
list of the type in the BindingSource. You have to do this in code in the
constructor of the form, or similar.

Joanna
 
You must connect the DataSource property of the BindingSource to a valid
list of the type in the BindingSource. You have to do this in code in the
constructor of the form, or similar.

Thanks a lot :) When you work with wizard you expect he will do everything
for you ;)
Jarod
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top