Click here to Skip to main content
15,891,981 members
Home / Discussions / WPF
   

WPF

 
AnswerRe: Logical/Visual Tree- why bother understand Pin
Pete O'Hanlon6-Jul-11 21:18
mvePete O'Hanlon6-Jul-11 21:18 
GeneralRe: Logical/Visual Tree- why bother understand [modified] Pin
devvvy6-Jul-11 23:44
devvvy6-Jul-11 23:44 
GeneralRe: Logical/Visual Tree- why bother understand Pin
Pete O'Hanlon9-Jul-11 6:45
mvePete O'Hanlon9-Jul-11 6:45 
AnswerRe: Logical/Visual Tree- why bother understand Pin
Mark Salsbery8-Jul-11 5:58
Mark Salsbery8-Jul-11 5:58 
QuestionList Of Expanders Pin
Kevin Marois6-Jul-11 5:50
professionalKevin Marois6-Jul-11 5:50 
AnswerRe: List Of Expanders Pin
Ian Shlasko6-Jul-11 8:26
Ian Shlasko6-Jul-11 8:26 
AnswerRe: List Of Expanders Pin
Mark Salsbery6-Jul-11 10:28
Mark Salsbery6-Jul-11 10:28 
QuestionDataGridTemplateColumn Binding problem [modified] Pin
Nicolai Schrade6-Jul-11 5:17
Nicolai Schrade6-Jul-11 5:17 
Hi all,

I made a DataGridTemplateColumn with a custom-made ComboBox inside. Here's the code:

<DataGridTemplateColumn x:Name="colfkey_tblGarne" Header="Garn" >
                                        <DataGridTemplateColumn.CellTemplate>
                                            <DataTemplate>
                                                <TextBlock Text="{Binding Path=Garn.Garnbezeichnung}" />
                                            </DataTemplate>
                                        </DataGridTemplateColumn.CellTemplate>
                                        <DataGridTemplateColumn.CellEditingTemplate>
                                            <DataTemplate>
                                                <local:ucComboBox 
                                      ItemsSource="{Binding Path=DataContext.AktuellerDatensatz.Lieferant.Garne, RelativeSource={RelativeSource FindAncestor, AncestorType=local:ucDataGrid, AncestorLevel=1}}" 
                                        SelectedValuePath="ID"  SelectedValue="{Binding Path=fkey_tblGarne}"
                                        DisplayMemberPath="Garnbezeichnung">
                                                    <DataGridTextColumn Header="Garn" Binding="{Binding Garnbezeichnung}"/>
                                                    <DataGridTextColumn Header="Garnnummer" Binding="{Binding GarnnummerText}" />
                                                    <DataGridTextColumn Header="Zusammensetzung" Binding="{Binding Garnzusammensetzung}" />
                                                </local:ucComboBox>
                                            </DataTemplate>
                                        </DataGridTemplateColumn.CellEditingTemplate>
                                    </DataGridTemplateColumn>


It displays the data correctly first, but When I alter one value in one row, all other rows get updated too Frown | :(
So I think, there is some problem with the ComboBox's Selected Value binding.

Here's the weird effect:
1.) when I start the application, everything is fine:
http://666kb.com/i/buz3b6b4ozvudmenf.jpg[^]

2.) when I alter the value via ComboBox in one row, mostly all other rows get updated too Frown | :( I'm writing "mostly", because this is really weird, and I can't see a pattern, it randomly updates the other rows too.
http://666kb.com/i/buz3e19wn5ba12w8b.jpg[^]

What am I doing wrong here?

PS: I tried with a standard ComboBox too, same problem.

Kind regards,
Nico

modified on Wednesday, July 6, 2011 11:27 AM

QuestionImplementing mouse events Pin
Lutosław5-Jul-11 14:05
Lutosław5-Jul-11 14:05 
AnswerRe: Implementing mouse events Pin
Mark Salsbery5-Jul-11 15:41
Mark Salsbery5-Jul-11 15:41 
GeneralRe: Implementing mouse events [modified] Pin
Lutosław6-Jul-11 3:11
Lutosław6-Jul-11 3:11 
AnswerRe: Implementing mouse events Pin
Lutosław6-Jul-11 7:45
Lutosław6-Jul-11 7:45 
QuestionDatagridview and image Pin
mrhydn4-Jul-11 20:31
mrhydn4-Jul-11 20:31 
AnswerRe: Datagridview and image Pin
Abhinav S5-Jul-11 2:01
Abhinav S5-Jul-11 2:01 
QuestionListbox or Gridview Pin
Mycroft Holmes4-Jul-11 14:44
professionalMycroft Holmes4-Jul-11 14:44 
AnswerRe: Listbox or Gridview Pin
Abhinav S4-Jul-11 19:45
Abhinav S4-Jul-11 19:45 
GeneralRe: Listbox or Gridview Pin
Mycroft Holmes4-Jul-11 19:57
professionalMycroft Holmes4-Jul-11 19:57 
GeneralRe: Listbox or Gridview Pin
Abhinav S5-Jul-11 1:57
Abhinav S5-Jul-11 1:57 
GeneralRe: Listbox or Gridview Pin
Mycroft Holmes5-Jul-11 2:22
professionalMycroft Holmes5-Jul-11 2:22 
AnswerRe: Listbox or Gridview Pin
RugbyLeague4-Jul-11 22:10
RugbyLeague4-Jul-11 22:10 
GeneralRe: Listbox or Gridview Pin
Mycroft Holmes4-Jul-11 22:29
professionalMycroft Holmes4-Jul-11 22:29 
GeneralRe: Listbox or Gridview Pin
RugbyLeague4-Jul-11 23:37
RugbyLeague4-Jul-11 23:37 
GeneralRe: Listbox or Gridview Pin
Mycroft Holmes5-Jul-11 2:24
professionalMycroft Holmes5-Jul-11 2:24 
GeneralRe: Listbox or Gridview Pin
RugbyLeague5-Jul-11 3:25
RugbyLeague5-Jul-11 3:25 
GeneralRe: Listbox or Gridview Pin
Pete O'Hanlon5-Jul-11 3:46
mvePete O'Hanlon5-Jul-11 3:46 

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.