Click here to Skip to main content
15,911,711 members
Home / Discussions / WPF
   

WPF

 
GeneralRe: WPF Editable ComboBox In GridView Pin
SledgeHammer014-Nov-11 8:14
SledgeHammer014-Nov-11 8:14 
GeneralRe: WPF Editable ComboBox In GridView Pin
Kevin Marois4-Nov-11 8:18
professionalKevin Marois4-Nov-11 8:18 
GeneralRe: WPF Editable ComboBox In GridView Pin
SledgeHammer014-Nov-11 8:41
SledgeHammer014-Nov-11 8:41 
GeneralRe: WPF Editable ComboBox In GridView Pin
Kevin Marois4-Nov-11 8:49
professionalKevin Marois4-Nov-11 8:49 
GeneralRe: WPF Editable ComboBox In GridView Pin
SledgeHammer014-Nov-11 8:55
SledgeHammer014-Nov-11 8:55 
GeneralRe: WPF Editable ComboBox In GridView Pin
Kevin Marois4-Nov-11 9:01
professionalKevin Marois4-Nov-11 9:01 
GeneralRe: WPF Editable ComboBox In GridView Pin
SledgeHammer014-Nov-11 10:34
SledgeHammer014-Nov-11 10:34 
GeneralRe: WPF Editable ComboBox In GridView Pin
Kevin Marois6-Nov-11 7:02
professionalKevin Marois6-Nov-11 7:02 
Here's the XAML as it is now:

<DataGrid x:Name="grdItems"
            Grid.Row="4"
            Grid.Column="0"
            Grid.ColumnSpan="2"
            AutoGenerateColumns="False"
            ItemsSource="{Binding SearchItems}"
            Visibility="{Binding GridVisible, Converter={StaticResource visibilityConverter}}"
            Margin="5">

    <DataGrid.Columns>
        <DataGridTemplateColumn Header="Search Terms"
                                Width="*">
            <DataGridTemplateColumn.CellEditingTemplate>
                <DataTemplate>
                    <ComboBox x:Name="cboBOMs"
                                Height="22" 
                                DataContext="{Binding ElementName=QueryView, Path=DataContext}"
                                IsEditable="True"
                                ItemsSource="{Binding BOMs}"
                                SelectedItem="{Binding SelectedBOMItem}"></ComboBox>
                </DataTemplate>
            </DataGridTemplateColumn.CellEditingTemplate>
        </DataGridTemplateColumn>
        <DataGridTextColumn Header="Quantity" 
                            Binding="{Binding Quantity}"
                            Width="100">
        </DataGridTextColumn>
    </DataGrid.Columns>

</DataGrid>


I don't understand what's going on because this code is in QueryView.xaml. You can see the combo is looking for the DC on QueryView.

The output window shows the error:
Cannot find source for binding with reference 'ElementName=QueryView'. BindingExpression:Path=DataContext; DataItem=null; target element is 'ComboBox' (Name='cboBOMs'); target property is 'DataContext' (type 'Object')



This appeaars to be right. I don't get it and I'm tired of screwing with it. if the DB wasn't so damn big I'd post the entire app on my site and ask for more help. I'm fairly frustrated at this point.
Everything makes sense in someone's mind

GeneralRe: WPF Editable ComboBox In GridView Pin
SledgeHammer017-Nov-11 6:46
SledgeHammer017-Nov-11 6:46 
AnswerRe: WPF Editable ComboBox In GridView Pin
Abhinav S3-Nov-11 17:13
Abhinav S3-Nov-11 17:13 
QuestionColumnDefinition MinWidth=744 Pin
indian1432-Nov-11 14:57
indian1432-Nov-11 14:57 
AnswerRe: ColumnDefinition MinWidth=744 Pin
Abhinav S2-Nov-11 18:04
Abhinav S2-Nov-11 18:04 
QuestionTrying To Shutdown WPF App - Application.Current is null Pin
Kevin Marois2-Nov-11 6:55
professionalKevin Marois2-Nov-11 6:55 
AnswerRe: Trying To Shutdown WPF App - Application.Current is null Pin
SledgeHammer012-Nov-11 7:49
SledgeHammer012-Nov-11 7:49 
GeneralRe: Trying To Shutdown WPF App - Application.Current is null Pin
Kevin Marois2-Nov-11 8:38
professionalKevin Marois2-Nov-11 8:38 
GeneralRe: Trying To Shutdown WPF App - Application.Current is null Pin
SledgeHammer012-Nov-11 8:47
SledgeHammer012-Nov-11 8:47 
AnswerRe: Trying To Shutdown WPF App - Application.Current is null Pin
Pete O'Hanlon2-Nov-11 8:52
mvePete O'Hanlon2-Nov-11 8:52 
QuestionIs there an existing Color-picker in WPF/Silverlight ? Pin
Loveisasea2-Nov-11 5:22
Loveisasea2-Nov-11 5:22 
AnswerRe: Is there an existing Color-picker in WPF/Silverlight ? Pin
Mark Salsbery2-Nov-11 5:25
Mark Salsbery2-Nov-11 5:25 
AnswerRe: Is there an existing Color-picker in WPF/Silverlight ? Pin
Pete O'Hanlon2-Nov-11 5:28
mvePete O'Hanlon2-Nov-11 5:28 
AnswerRe: Is there an existing Color-picker in WPF/Silverlight ? Pin
Abhinav S2-Nov-11 18:13
Abhinav S2-Nov-11 18:13 
QuestionItems collection must be empty before using ItemsSource. Pin
jhoga2-Nov-11 4:39
jhoga2-Nov-11 4:39 
AnswerRe: Items collection must be empty before using ItemsSource. Pin
Mark Salsbery2-Nov-11 5:23
Mark Salsbery2-Nov-11 5:23 
GeneralRe: Items collection must be empty before using ItemsSource. Pin
jhoga2-Nov-11 5:52
jhoga2-Nov-11 5:52 
GeneralRe: Items collection must be empty before using ItemsSource. Pin
Mark Salsbery2-Nov-11 7:06
Mark Salsbery2-Nov-11 7:06 

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.