D
Danny Nielsen
Hi
I am having trouble figuring out how to use combobox in a datagridview.
What seemed to be a simple task turned out not to arrghh.
I have a dataGridView with 4 columns, one of them is column ID
(double). I want to be able to lookup a textual value using a combobox
and - when choosed - replace this textual value with the corresponding
ID ...
the pulldownlist has a dataSource pointing to a table. It shows a text
field from this table (displayMember) and inserts a double field
(valueMember)
.... when I startup the application I fill the dataAdapter. If the
adapter returns more than one row it popups with a message
System.argumentexception: datagridviewcomboboxcell value is not valid.
and I just cant find any logic in it. I assume the value in the
combobox can differ from row to row (I mean not as in the good old ms
Access days where the pulldownlist control always were the same no
matter there were many rows)
Does anyone outthere have any experience using combobox in
datagridview.
Thanks .
regards Danny
I am having trouble figuring out how to use combobox in a datagridview.
What seemed to be a simple task turned out not to arrghh.
I have a dataGridView with 4 columns, one of them is column ID
(double). I want to be able to lookup a textual value using a combobox
and - when choosed - replace this textual value with the corresponding
ID ...
the pulldownlist has a dataSource pointing to a table. It shows a text
field from this table (displayMember) and inserts a double field
(valueMember)
.... when I startup the application I fill the dataAdapter. If the
adapter returns more than one row it popups with a message
System.argumentexception: datagridviewcomboboxcell value is not valid.
and I just cant find any logic in it. I assume the value in the
combobox can differ from row to row (I mean not as in the good old ms
Access days where the pulldownlist control always were the same no
matter there were many rows)
Does anyone outthere have any experience using combobox in
datagridview.
Thanks .
regards Danny