Quantcast
Channel: Windows Forms Data Controls and Databinding forum
Viewing all articles
Browse latest Browse all 2535

DataGridView and custom object

$
0
0
Hello.
I have an entity Customer with some properties like a name, surname and etc.
And in this entity I have object Currency(this is a class with 2 fields(Id and Value)).

I created an object data source for object Customer.
I set to datasource of my gridview list of Customer's.

dataGridView.DataSource = new List<Customer>{...}

Binding is worked nice, but column Currency is empty. I thought that in this column setted value of method ToString() of object Currency, but I was wrong.

How can I set value of column which binding on object Currency?

Viewing all articles
Browse latest Browse all 2535

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>