HighTechTalks DotNet Forums  

Dependency between Combobox Columns in Datagridview

Dotnet Framework (WinForms DataBinding) microsoft.public.dotnet.framework.windowsforms.databinding


Discuss Dependency between Combobox Columns in Datagridview in the Dotnet Framework (WinForms DataBinding) forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
Stephan Zaubzer
 
Posts: n/a

Default Dependency between Combobox Columns in Datagridview - 08-26-2008 , 11:33 AM






Hi all,
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?

regards

Stephan Zaubzer

Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.