Hi,
I have a WPF application and I'm using using a dataset to perform CRUD operations.
I'm also using a ValidationRule for all the textboxes.
What I want is that if the user clicks the ADD or UPDATE button, I want to check if the window validates and if so then I want to Insert or Update data.
Loading
Aloce JorsenPosted Nov 18, 2015, 2:46 AM
Jignesh TrivediPosted Nov 17, 2015, 10:08 PM
Guest UserPosted Nov 17, 2015, 3:25 PM
Sorry for coming back you late.
Thank you for taking time to answer my question. The articles you suggest helped, but it's not enough for what I want to achieve.
What I want is to check if the Window validates like on WinForm:
if(this.Validate()){
dataset.tableFoo.AddNewRow(x)
}
Alternatively I want a command to disable the ADD and UPDATE buttons if the a validation fails.
I will really appreciate it if you can help.
Thank You.
Banketeshvar NarayanPosted Nov 13, 2015, 12:32 PM
The below links can help you:
http://www.c-sharpcorner.com/Blogs/50605/wpf-required-field-validation.aspx
http://stackoverflow.com/questions/18930125/wpf-validation-using-validationrule-class
http://www.codeproject.com/Tips/690130/Simple-Validation-in-WPF
Please mark as answer if it helps you.