Dependency between Combobox Columns in Datagridview - 08-26-2008 , 11:33 AM
I want to use a Datagridview to edit a table where employees enter the
amount of time they spend working certain projects.
Each project is divided into several sub projects. Projects are modeled
in a 1:n relation. To select the project I use a Combobox column where
the valuemember is the primary key of the project and the displaymember
is the name if the project. For the sub project column I want to use a
ComboboxColumn too but the datasource for the items in the Combobox
should be set to only the child projects of the selected project.
However this cannot simply be done by cascading the corresponding
bindingsources, because upon selecting another project in some line
destroys the contents in the subproject column because the datasource of
the subproject column is different. In effect, the datasource for the
sub project column may be different for every single row in the
datagridview. Does anybody know how this issue can be overcome?
|Thread Tools||Search this Thread|