views:

53

answers:

0

I can add a DataGridViewButtonColumn to an existing DataGridView that is databound to a BindingList of my class. (There doesn't seem to be a way to have a DataGridViewButtonColumn auto generated - you apparently have to add manually)

Is there a way to control the text that is displayed on the buttons by having it bound to a public property in the underlying class?

As an example, say I have a class Car.cs that has properties Make and Year. There's a datagridview that is bound to a BindingList of Cars. I'd like to add a DataGridViewButtonColumn to the DataGridView that displays with text from another property of Car.cs called Cost.