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

WPF

 
QuestionGet Data from ViewModel in Code behind using MVVM Pin
NTheOne8-Apr-11 21:58
NTheOne8-Apr-11 21:58 
AnswerRe: Get Data from ViewModel in Code behind using MVVM Pin
Mycroft Holmes8-Apr-11 22:22
professionalMycroft Holmes8-Apr-11 22:22 
AnswerRe: Get Data from ViewModel in Code behind using MVVM Pin
Abhinav S8-Apr-11 22:35
Abhinav S8-Apr-11 22:35 
AnswerRe: Get Data from ViewModel in Code behind using MVVM Pin
SledgeHammer019-Apr-11 8:07
SledgeHammer019-Apr-11 8:07 
QuestionChange the display of a combobox control into hyperlink Pin
Rocky237-Apr-11 20:57
Rocky237-Apr-11 20:57 
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 
I don't like the behavior of the datagrid when using the celltemplate and cell editting template elements of WPF.

<DataGridTemplateColumn
                    Header="Street Name"
                    Width="77">
                    <DataGridTemplateColumn.CellTemplate>
                        <DataTemplate>
                            <TextBlock
                                Text="{Binding street}" />
                        </DataTemplate>
                    </DataGridTemplateColumn.CellTemplate>
                    <DataGridTemplateColumn.CellEditingTemplate>
                        <DataTemplate>
                            <TextBox
                                Text="{Binding street, ValidatesOnDataErrors=True,UpdateSourceTrigger=PropertyChanged}" />
                        </DataTemplate>
                    </DataGridTemplateColumn.CellEditingTemplate>
                </DataGridTemplateColumn>


You have to double tab to access the editing feature of the cell, you have to double click to edit it and it is when you use a combobox it gets even worse. Has anyone managed to make the DG usable? As it stands right now I need it, but I am almost embarrassed to release software with such erratic behavior. Does anyone have pointers on making this thing useful? My major issues are the double clicking issue with cellediting / celltemplate and the usability of a drop down:

<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>


If this thing is a pain, is there a useful method of validating the datagrid without using the celltemplate / celleditingtemplate?

Cheers, --EA
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 
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 

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.