Click here to Skip to main content
15,885,216 members
Home / Discussions / WPF
   

WPF

 
GeneralRe: How to create video chat application in wpf????? Pin
harjindersingh28-Oct-09 19:28
harjindersingh28-Oct-09 19:28 
QuestionHow to check all rows in DataGrid by clicking Check all Button in WPF in C# Pin
ChandrakanthGaddam27-Oct-09 0:48
ChandrakanthGaddam27-Oct-09 0:48 
AnswerRe: How to check all rows in DataGrid by clicking Check all Button in WPF in C# Pin
Pete O'Hanlon27-Oct-09 0:56
mvePete O'Hanlon27-Oct-09 0:56 
GeneralRe: How to check all rows in DataGrid by clicking Check all Button in WPF in C# Pin
ChandrakanthGaddam27-Oct-09 1:08
ChandrakanthGaddam27-Oct-09 1:08 
GeneralRe: How to check all rows in DataGrid by clicking Check all Button in WPF in C# Pin
Pete O'Hanlon27-Oct-09 1:36
mvePete O'Hanlon27-Oct-09 1:36 
QuestionReference to parent collection Pin
ausadmin26-Oct-09 19:38
ausadmin26-Oct-09 19:38 
AnswerRe: Reference to parent collection Pin
Pete O'Hanlon26-Oct-09 22:44
mvePete O'Hanlon26-Oct-09 22:44 
GeneralRe: Reference to parent collection Pin
ausadmin27-Oct-09 9:54
ausadmin27-Oct-09 9:54 
Pete,

Thank you for your reply. I have read the article you refer to ("The Observable Dictionary Sample" - correct?), however I am not clear on how this might solve the problem.

I need to explain a bit more about the scenario. We have a WPF DataGrid bound to our ObservableCollection - this works really well. I am now trying to handle validation as a user makes changes. Where the valiadtion can be based solely on the content of the member object (ie the data in the row, e.g. ensure an age is between 5 and 50) - no problem, use the ValidationRule approach as is well documented. What I am having trouble with is the scenario where a value must be checked against all others in the ObservableCollection - I don't know of any way to make the ValidationRule class know about the parent collection.

So I think this problem will exist, whether we are using ObservableCollection or ObservableDictionary. Please correct me if I have misunderstood your post.

Maybe I am missing something, on how we can pass in the parent collection, to the ValidationRule instance (ie NameRule) that is doing the validation.

Our xaml is
<toolkit:DataGridTextColumn  Header="Name" Width="100"  >
    <toolkit:DataGridTextColumn.Binding  >
        <Binding Path="Name" >
            <Binding.ValidationRules>
                <local:NameRule ValidationStep="UpdatedValue"/>
            </Binding.ValidationRules>
        </Binding>
    </toolkit:DataGridTextColumn.Binding>
</toolkit:DataGridTextColumn>


There could be several ways to solve this, outside of the DataGrid, but I am trying to find the best method which utilises the WPF way of doing validation.

BTW, I have reviewed the excellent article "WPF DataGrid Practical Examples" [^], and this addresses data validation. However the example provided is based on a DataTable as itemssource (in which case you can refer back to the DataTable), and it seems there should also be a way to use ObservableCollection as the itemssource.

Any further suggestions would be appreciated.

Tim
GeneralRe: Reference to parent collection Pin
Pete O'Hanlon27-Oct-09 10:12
mvePete O'Hanlon27-Oct-09 10:12 
GeneralRe: Reference to parent collection Pin
ausadmin27-Oct-09 19:16
ausadmin27-Oct-09 19:16 
GeneralRe: Reference to parent collection Pin
ausadmin29-Oct-09 1:33
ausadmin29-Oct-09 1:33 
QuestionUserControl - visualbrush not rendered Pin
DeepakMega26-Oct-09 3:04
DeepakMega26-Oct-09 3:04 
AnswerRe: UserControl - visualbrush not rendered Pin
DeepakMega26-Oct-09 4:16
DeepakMega26-Oct-09 4:16 
Question3D Graphics C# and WPF Browser Application Pin
427748025-Oct-09 9:04
427748025-Oct-09 9:04 
GeneralRe: 3D Graphics C# and WPF Browser Application Book recommendation Pin
Richard MacCutchan25-Oct-09 13:31
mveRichard MacCutchan25-Oct-09 13:31 
AnswerRe: 3D Graphics C# and WPF Browser Application Pin
Death8U29-Oct-09 7:31
Death8U29-Oct-09 7:31 
QuestionMVVM Pattern Pin
NETLearning24-Oct-09 18:21
NETLearning24-Oct-09 18:21 
AnswerRe: MVVM Pattern Pin
Richard MacCutchan24-Oct-09 23:07
mveRichard MacCutchan24-Oct-09 23:07 
AnswerRe: MVVM Pattern Pin
Steve Westbrook26-Oct-09 7:00
Steve Westbrook26-Oct-09 7:00 
QuestionWPF MVVM Pin
NETLearning24-Oct-09 15:02
NETLearning24-Oct-09 15:02 
AnswerRe: WPF MVVM Pin
Richard MacCutchan24-Oct-09 23:08
mveRichard MacCutchan24-Oct-09 23:08 
QuestionMVVM newbie question - showing OpenFileDialog? Pin
Judah Gabriel Himango24-Oct-09 14:33
sponsorJudah Gabriel Himango24-Oct-09 14:33 
AnswerRe: MVVM newbie question - showing OpenFileDialog? Pin
Pete O'Hanlon25-Oct-09 9:36
mvePete O'Hanlon25-Oct-09 9:36 
GeneralRe: MVVM newbie question - showing OpenFileDialog? Pin
Judah Gabriel Himango25-Oct-09 16:01
sponsorJudah Gabriel Himango25-Oct-09 16:01 
GeneralRe: MVVM newbie question - showing OpenFileDialog? Pin
Pete O'Hanlon25-Oct-09 22:05
mvePete O'Hanlon25-Oct-09 22:05 

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.