Click here to Skip to main content
15,897,704 members
Home / Discussions / .NET (Core and Framework)
   

.NET (Core and Framework)

 
AnswerRe: System-wide singleton? Pin
Colin Angus Mackay15-Mar-04 0:32
Colin Angus Mackay15-Mar-04 0:32 
GeneralRe: System-wide singleton? Pin
NameOfTheDragon15-Mar-04 1:07
NameOfTheDragon15-Mar-04 1:07 
GeneralRe: System-wide singleton? Pin
Philip Fitzsimons15-Mar-04 2:43
Philip Fitzsimons15-Mar-04 2:43 
AnswerRe: System-wide singleton? Pin
Curi0us_George22-Mar-04 14:17
Curi0us_George22-Mar-04 14:17 
General.Net Remoting Pin
Daniel Popa15-Mar-04 0:08
Daniel Popa15-Mar-04 0:08 
GeneralRe: .Net Remoting Pin
Philip Fitzsimons15-Mar-04 2:45
Philip Fitzsimons15-Mar-04 2:45 
Generalget your email i'll send you a c# remoting pdf book Pin
yzs18-Mar-04 0:24
yzs18-Mar-04 0:24 
GeneralDatabinding drives me crazy Pin
Jasper van Rooijen15-Mar-04 0:07
Jasper van Rooijen15-Mar-04 0:07 
Hi,
It can't figure out how to use the databinding/datasource for following situation. I have built a datamodel using xsd and a generated dataset. I want to navigate through and edit the records of a certain table. So a collection of controls is bound to the attributes of this table. Editing and navigating works fine for most of the attributes. Attributes containing the foreign key to a related table give me the problem. I have two related tables :

- Group which is a parent of the main table
- Sub Group which is a parent of the main table
- Group is also a parent of sub group

The combobox control for the foreign key field of group table is setup like this :
- Databinding : SelectedValue - Main.Group
- Datasource : Group
- DisplayMember : Name (Which is an attribute of the group table)
- ValueMember : Id (Which is an attribute of the group table)

So far so good; Navigating ok, and editing ok. ComboBox is filled with all records of group table and gets refreshed on navigating through the records in the main table.

Now I want to create a similar combobox for the foreign key field of the sub group table, but with an extra constraint. The combobox must be filled only with those records from the subgroup table which are related to the selected group. I've setup the control like this :

- Databinding : SelectedValue - Main.SubGroup
- Datasource : Group
- DisplayMember : GroupSubGroup.Name (Use the relation field)
- ValueMember : GroupSubGroup.Id (Use the relation field)

Now filtering takes place on navigation, so only relevant subgroups are included into the list of the combobox. But the selected value is always the first in the list, which is not correct and seems to result in an implicit change of the data.
I've been struggling with a lot of events as well but none of all seem to give me a clue. It pretty much looks like a the order in which things take place. So SelectedValue is updated on navigation for th SubGroup combobox and after that the list is filled with relevant records and results in selecting the first from the list.

Does anyone know a solution for this ?


GeneralRe: Databinding drives me crazy Pin
cosminadrianpopescu21-Mar-04 21:13
cosminadrianpopescu21-Mar-04 21:13 
General.NET Assembly is MFC Pin
Tarundeep Singh Kalra11-Mar-04 17:33
Tarundeep Singh Kalra11-Mar-04 17:33 
GeneralRe: .NET Assembly is MFC Pin
ian mariano11-Mar-04 18:14
ian mariano11-Mar-04 18:14 
GeneralRe: .NET Assembly is MFC Pin
Tarundeep Singh Kalra11-Mar-04 18:55
Tarundeep Singh Kalra11-Mar-04 18:55 
GeneralTreeviewnode Highlighting Pin
Anonymous11-Mar-04 14:17
Anonymous11-Mar-04 14:17 
GeneralSyntax highlghting editor Pin
Ryan Roberts10-Mar-04 23:49
Ryan Roberts10-Mar-04 23:49 
GeneralRe: Syntax highlghting editor Pin
Werdna12-Mar-04 4:40
Werdna12-Mar-04 4:40 
GeneralRe: Syntax highlghting editor Pin
Ryan Roberts12-Mar-04 4:55
Ryan Roberts12-Mar-04 4:55 
QuestionC# for Mac and Linux ? Pin
Matthew Hazlett10-Mar-04 11:13
Matthew Hazlett10-Mar-04 11:13 
AnswerRe: C# for Mac and Linux ? Pin
ian mariano11-Mar-04 18:17
ian mariano11-Mar-04 18:17 
GeneralRe: C# for Mac and Linux ? Pin
Werdna12-Mar-04 4:43
Werdna12-Mar-04 4:43 
GeneralRe: C# for Mac and Linux ? Pin
IGx8923-Mar-04 15:59
IGx8923-Mar-04 15:59 
GeneralMonitoring System temperature Pin
Ian Powell10-Mar-04 7:19
Ian Powell10-Mar-04 7:19 
GeneralRe: Monitoring System temperature Pin
ian mariano11-Mar-04 18:33
ian mariano11-Mar-04 18:33 
GeneralRe: Monitoring System temperature Pin
eggie515-May-04 10:37
eggie515-May-04 10:37 
GeneralRe: Monitoring System temperature Pin
ian mariano11-Mar-04 18:37
ian mariano11-Mar-04 18:37 
GeneralRe: Monitoring System temperature Pin
ian mariano11-Mar-04 18:42
ian mariano11-Mar-04 18:42 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.