S
Steve
I'm in a weird situation where I'm using ComboBox's in a DataGrid. When the
ComboBox selection changes, I'm currently storing the SelectedValue object
into the DataSource of the DataGrid cell. This is not what I want.
I want to bind a string to the datagrid, then bind the string and value of a
lookup table to the combo box. When the combobox lookup is changed, I
wanted to store the value in a different, unbound property of the bound
class.
Does that make sense? Anyway, in the constructor for the Derived
DataGridComboBoxColumn class, I pass in the 2 columns of a DataTable that
will represent the Display and Value fields for the control. I also wanted
to pass in the string name of the class property that I would like to update
with the value from the combo box. Then, when I update the grid, I can use
the CurrencyManager to get to the bound data and hopefully find the property
from the string name and set it's data?
The reason I can't just hard code this is that there are several combo
columns and they all need to access different fields of the bound class.
God, does that sound like a horrible hack
But, it's all I got...
Thanks for any help,
Steve
ComboBox selection changes, I'm currently storing the SelectedValue object
into the DataSource of the DataGrid cell. This is not what I want.
I want to bind a string to the datagrid, then bind the string and value of a
lookup table to the combo box. When the combobox lookup is changed, I
wanted to store the value in a different, unbound property of the bound
class.
Does that make sense? Anyway, in the constructor for the Derived
DataGridComboBoxColumn class, I pass in the 2 columns of a DataTable that
will represent the Display and Value fields for the control. I also wanted
to pass in the string name of the class property that I would like to update
with the value from the combo box. Then, when I update the grid, I can use
the CurrencyManager to get to the bound data and hopefully find the property
from the string name and set it's data?
The reason I can't just hard code this is that there are several combo
columns and they all need to access different fields of the bound class.
God, does that sound like a horrible hack
But, it's all I got...
Thanks for any help,
Steve