Click here to Skip to main content
15,896,154 members
Home / Discussions / WPF
   

WPF

 
AnswerRe: Change the display of a combobox control into hyperlink Pin
Mycroft Holmes7-Apr-11 22:20
professionalMycroft Holmes7-Apr-11 22:20 
AnswerRe: Change the display of a combobox control into hyperlink Pin
SledgeHammer018-Apr-11 7:57
SledgeHammer018-Apr-11 7:57 
QuestionDataGrid CellTemplate / CellEditingTemplate Pin
eddieangel7-Apr-11 9:31
eddieangel7-Apr-11 9:31 
AnswerRe: DataGrid CellTemplate / CellEditingTemplate Pin
SledgeHammer017-Apr-11 14:05
SledgeHammer017-Apr-11 14:05 
AnswerRe: DataGrid CellTemplate / CellEditingTemplate Pin
Mycroft Holmes7-Apr-11 14:36
professionalMycroft Holmes7-Apr-11 14:36 
GeneralRe: DataGrid CellTemplate / CellEditingTemplate Pin
eddieangel8-Apr-11 6:14
eddieangel8-Apr-11 6:14 
GeneralRe: DataGrid CellTemplate / CellEditingTemplate Pin
SledgeHammer018-Apr-11 7:59
SledgeHammer018-Apr-11 7:59 
GeneralRe: DataGrid CellTemplate / CellEditingTemplate Pin
eddieangel8-Apr-11 9:47
eddieangel8-Apr-11 9:47 
I think it is ridiculous to have to create a workaround for a dysfunctional control. In this particular issue, the "New Row" behavior of a datagrid is so erratic that I am hesitant to use it. The editing of existing rows is easy enough, but the adding a new row is a pain in the butt that I am almost willing to mitigate the pain of by adding a small control on the screen to insert new rows into the datagrid.

Has anyone had success with new rows? My issue is primarily that the comboxbox / textbox cellediting template leaves the textbox blank when you choose an item from the combobox in the following code:

<DataGridTemplateColumn
                    Header="State"
                    Width="60">
                    <DataGridTemplateColumn.CellTemplate>
                        <DataTemplate>
                            <TextBlock
                                Text="{Binding PropertyState.name}" />
                        </DataTemplate>
                    </DataGridTemplateColumn.CellTemplate>
                    <DataGridTemplateColumn.CellEditingTemplate>
                        <DataTemplate>
                            <ComboBox
                                ItemsSource="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type UserControl}},Path=DataContext.PropertyStates, ValidatesOnDataErrors=True,UpdateSourceTrigger=PropertyChanged}"
                                DisplayMemberPath="name"
                                SelectedValuePath="id"
                                SelectedValue="{Binding stateId}" />
                        </DataTemplate>
                    </DataGridTemplateColumn.CellEditingTemplate>
                </DataGridTemplateColumn>


After I choose an item from the drop down and leave the field it is a blank textbox.
GeneralRe: DataGrid CellTemplate / CellEditingTemplate Pin
SledgeHammer018-Apr-11 10:18
SledgeHammer018-Apr-11 10:18 
GeneralRe: DataGrid CellTemplate / CellEditingTemplate Pin
eddieangel8-Apr-11 10:29
eddieangel8-Apr-11 10:29 
GeneralRe: DataGrid CellTemplate / CellEditingTemplate Pin
SledgeHammer018-Apr-11 10:52
SledgeHammer018-Apr-11 10:52 
GeneralRe: DataGrid CellTemplate / CellEditingTemplate Pin
eddieangel8-Apr-11 11:43
eddieangel8-Apr-11 11:43 
GeneralRe: DataGrid CellTemplate / CellEditingTemplate Pin
SledgeHammer018-Apr-11 12:03
SledgeHammer018-Apr-11 12:03 
GeneralRe: DataGrid CellTemplate / CellEditingTemplate Pin
eddieangel8-Apr-11 12:07
eddieangel8-Apr-11 12:07 
GeneralRe: DataGrid CellTemplate / CellEditingTemplate Pin
SledgeHammer018-Apr-11 12:18
SledgeHammer018-Apr-11 12:18 
GeneralRe: DataGrid CellTemplate / CellEditingTemplate Pin
eddieangel8-Apr-11 12:30
eddieangel8-Apr-11 12:30 
QuestionWhat Is A HitTest? Pin
Kevin Marois7-Apr-11 5:35
professionalKevin Marois7-Apr-11 5:35 
AnswerRe: What Is A HitTest? Pin
Pete O'Hanlon7-Apr-11 6:27
mvePete O'Hanlon7-Apr-11 6:27 
GeneralRe: What Is A HitTest? Pin
Kevin Marois7-Apr-11 6:32
professionalKevin Marois7-Apr-11 6:32 
GeneralRe: What Is A HitTest? Pin
Pete O'Hanlon7-Apr-11 6:38
mvePete O'Hanlon7-Apr-11 6:38 
GeneralRe: What Is A HitTest? Pin
Kevin Marois7-Apr-11 6:40
professionalKevin Marois7-Apr-11 6:40 
GeneralRe: What Is A HitTest? Pin
Pete O'Hanlon7-Apr-11 6:51
mvePete O'Hanlon7-Apr-11 6:51 
GeneralRe: What Is A HitTest? Pin
Kevin Marois7-Apr-11 6:52
professionalKevin Marois7-Apr-11 6:52 
GeneralRe: What Is A HitTest? Pin
Pete O'Hanlon7-Apr-11 8:29
mvePete O'Hanlon7-Apr-11 8:29 
GeneralRe: What Is A HitTest? Pin
Kevin Marois7-Apr-11 8:45
professionalKevin Marois7-Apr-11 8:45 

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.