Hi. I have a class which exposes an array as a property. I want to bind a
List of these classes to a DataGridView, where the columns are set up in
advance for known indexes of this array. For example:
class MyClass
{
public decimal[] DiscountRates { get {...} }
}
...
DataGridViewTextBoxColumn column = new DataGridViewTextBoxColumn();
column.HeaderText = "Discount Rate 1";
column.DataPropertyName = ???? // what goes here?
myDataGridView.Columns.Add(column);
myDataGridView.DataSource = List<MyClass>
I tried "DiscountRates[0]" as the DataPropertyName but this doesn't seem to
work. How do I do this?
Many thanks