Chrissivo

Hi there,
I've got the following problem: I've got a project folder with two projects in it. One contains a service, the other one contains only a Windows Forms application by now, which shall later on access the service.

I tried to add a DataGridView to the Windows Forms application. No problem so far. But when I tried to set the DataBindingSource to a class of the other project, there hasn't been any column added to the DataGridView.

Well I thought this problem might be dependent on the fact, that my source is not in the very same project. And although I didn't want to because of inconsistency I added the class with the needed data structure to the project I have to access it from. But again, after adding this file as my DataBindingSource, I couldn't see any of my wanted columns.

So it seems to me, that the reason for this "feature" is a problem of my modifiers, because when I added the form itself as a DataSource, I have had lots columns instantly. So how do I have to modify my class in order to use it as a DataSource The class itself contains two local enumerable types, which offer the set of values for two variables. The third variable is a string.

Finally two of the columns should be ComboBoxes with all the values the enum-types offer.

Thanks in advance

Christian



Re: Windows Forms Data Controls and Databinding DataBinding for DataGridView isn't working as I like it to...

Ken Tucker

You can only bind to properties in a class not public variables.





Re: Windows Forms Data Controls and Databinding DataBinding for DataGridView isn't working as I like it to...

Chrissivo

Thank you very much, this solved my problem. I haven't been aware of properties and their meanings till now.