Click here to Skip to main content
15,904,351 members
Home / Discussions / WPF
   

WPF

 
GeneralRe: It it just me or is SL/WCF development really flaky Pin
Kubajzz9-Oct-10 23:47
Kubajzz9-Oct-10 23:47 
GeneralRe: It it just me or is SL/WCF development really flaky Pin
Pete O'Hanlon10-Oct-10 3:43
mvePete O'Hanlon10-Oct-10 3:43 
AnswerRe: It it just me or is SL/WCF development really flaky Pin
Abhinav S11-Oct-10 17:44
Abhinav S11-Oct-10 17:44 
GeneralRe: It it just me or is SL/WCF development really flaky Pin
Mycroft Holmes11-Oct-10 17:59
professionalMycroft Holmes11-Oct-10 17:59 
GeneralRe: It it just me or is SL/WCF development really flaky Pin
Abhinav S11-Oct-10 18:35
Abhinav S11-Oct-10 18:35 
GeneralRe: It it just me or is SL/WCF development really flaky Pin
#realJSOP13-Oct-10 0:16
professional#realJSOP13-Oct-10 0:16 
GeneralRe: It it just me or is SL/WCF development really flaky Pin
Mycroft Holmes13-Oct-10 0:54
professionalMycroft Holmes13-Oct-10 0:54 
QuestionCombobox Question - MVVM Pin
eddieangel8-Oct-10 10:30
eddieangel8-Oct-10 10:30 
I have two comboboxes on my view. One is for categories,and one is for subcategories belonging to categories.

So the data might look like this:

Category-

Fruit
Vegetable

SubCategory-
Apple
Orange
Carrot

So what I want is the second combobox to display only carrot when the user chooses vegetable, and apple, etc when they choose fruit.

The relationships are set up in the database and my only issue is the event driven binding. When the window loads the view model I load the categories, but not the subcategories because I don't know which ones to load until the user selects a record from a listview.

So my question is twofold:

1. From the view how do I trigger the databinding of the subcategory combobox in the event that the listbox item is changed.
2. From the view how do I trigger the databinding of the subcategory combobox in the event that the category combobox selecteditem is changed.

This is the datasource for the subcategory combobox.

public ObservableCollection<Defect> AllSubCategories { get; private set; }

        private void CreateAllSubCategories(int categoryId)
        {
            var query = _dc.subCategories.Where(subcategory => subcategory.categoryId == categoryId);
            var allDefects = query.ToList();

            AllSubCategories = new ObservableCollection<SubCategory>(allSubCategories);
        }


Cheers, --EA
AnswerRe: Combobox Question - MVVM Pin
Abhinav S8-Oct-10 18:43
Abhinav S8-Oct-10 18:43 
GeneralRe: Combobox Question - MVVM Pin
eddieangel11-Oct-10 9:14
eddieangel11-Oct-10 9:14 
Questionwhat is use of silverlight Pin
deepak chaudhari snk8-Oct-10 1:16
deepak chaudhari snk8-Oct-10 1:16 
AnswerRe: what is use of silverlight Pin
Mycroft Holmes8-Oct-10 1:22
professionalMycroft Holmes8-Oct-10 1:22 
AnswerRe: what is use of silverlight Pin
#realJSOP8-Oct-10 2:05
professional#realJSOP8-Oct-10 2:05 
AnswerRe: what is use of silverlight Pin
Pete O'Hanlon8-Oct-10 2:31
mvePete O'Hanlon8-Oct-10 2:31 
AnswerRe: what is use of silverlight Pin
Abhinav S8-Oct-10 5:53
Abhinav S8-Oct-10 5:53 
QuestionRun Exe on server Pin
sumit70347-Oct-10 22:59
sumit70347-Oct-10 22:59 
AnswerRe: Run Exe on server Pin
#realJSOP7-Oct-10 23:47
professional#realJSOP7-Oct-10 23:47 
QuestionDownload file from server on button click Pin
sumit70347-Oct-10 20:37
sumit70347-Oct-10 20:37 
AnswerRe: Download file from server on button click Pin
Abhinav S7-Oct-10 20:47
Abhinav S7-Oct-10 20:47 
Questionxaml - binding path - escape double quote Pin
devvvy7-Oct-10 16:38
devvvy7-Oct-10 16:38 
AnswerRe: xaml - binding path - escape double quote Pin
Abhinav S7-Oct-10 20:51
Abhinav S7-Oct-10 20:51 
AnswerRe: xaml - binding path - escape double quote Pin
PumbaPumba13-Oct-10 9:33
PumbaPumba13-Oct-10 9:33 
QuestionMVVM Pin
eddieangel7-Oct-10 7:49
eddieangel7-Oct-10 7:49 
AnswerRe: MVVM Pin
Pete O'Hanlon7-Oct-10 11:49
mvePete O'Hanlon7-Oct-10 11:49 
GeneralRe: MVVM Pin
eddieangel7-Oct-10 11:51
eddieangel7-Oct-10 11:51 

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.