Quantcast
Channel: DevExpress Support Center (Examples)
Viewing all articles
Browse latest Browse all 7205

How to сreate a сustom Edit Appointment form using the MVVM pattern

$
0
0
This example demonstrates how to substitute the standard Edit Appointment form with the custom one using the MVVM approach. The new technique is based on a service provided by a data template. This service allows displaying a form in a separate window. 

See also: 
How to: Create a Custom Edit Appointment Form Using the MVVM Pattern (step-by-step guide)

Question Comments

Added By: Cliff Knasinski at: 8/27/2014 9:05:27 AM    

I have an issue with using this example to commit the changes to my custom field back to the MS SQL Server database.  I am utilizing a design structure that is not represented in the examples from DevExpress.  I am using a LINQ to SQL class as my data model, and View Models to bind to those models.

Since I am unable to use the LINQ .CommitChanges method from the custom appointment form since I cannot send it as a parameter to the constructor using this example.  My View Model reflects the changes made by the form since it is bound two ways, but I have no way to fire off the .CommitChanges method.  

I noticed there is a ..

<Button x:Name="btnOk"
               Content="OK"
               Command="{Binding SaveAppointmentCommand}" MinWidth="75" Margin="6,0,0,0"/>

But this command is not used in the example.  I have not delved into commands yet, is there an example I can use that would allow me to fire off a method in the View Model this is bound too in order to commit changes to the database?


Viewing all articles
Browse latest Browse all 7205

Trending Articles