I read a couple of posts on how to create a custom dailog and the documentation also describes the steps to create a cistom dialog.Here is what i have so far, i wrote my custom dialog factory which inherits from ScheduleDialogFactoryBase and I wrote a custom view that displays properties for my appointment object. (the list data connector is bound to my custom object and i did the mapping )
When i change properties in my dailog for my entity, like start date time, i need it to update the infragistics appointment object too.Is there a clean way of doing this?
I am using MVVM model and i cannot access infragistics entities there and I have a wrapped control that wraps the ScheduleView.
It would be og great help if you could provide me with a sample that syncs the custom object in the custom dialog with the infragisitcs appointment object.
Please Suggest.
Thank You,
Hariharan
Please find attached a sample project , when i make a change and click on save, I need to be able to do my validation and cancel Save and Close operation if validation fails.
Ok so if i am using the Activity or Appointment Dialog Core, How do i wire my custom logic to the save command ?
I tried using the Activity Changed that gets fired when i save the appointment, but i need to be able to do some validation on save and stop save and close from happening if my validation fails. I tried handling this on Activity Changing , but I am not able to stop the dialog from closing if my validation fails.
If you're using our ActivityDialogCore then this will be handled by the commands associated with that dialog - ActivityDialogCoreSaveAndClose, ActivityDialogCoreCloseCommand, etc. If you are providing a completely new element then I don't think there is anything currently. You could create a Wpf Window to host your element and return that and the datamanager will just show your form (modelessly or modally depending on the dialog type being displayed) and you can handle closing the window.
The appointment dialog needs to deal with our object - Appointment in this case - as well as our xamScheduleDataManager which then communicates with the connector. One of the main reasons is that there is no data item when creating a new Appointment until the Appointment is committed. The appointment dialog is a view specific object and in this case specific to our view related objects so it is ok to be interacting with the objects in code.
That being said if you're just looking to expose additional properties in your appointment dialog you probably don't need to write a brand new view and likely don't need to interact with our objects. You could re-template the AppointmentDialogCore (using our default style as the basis for your template) and add elements to the template. The DataContext will be the activity - Appointment in this case.
I've attached a basic sample that does this. It exposes the Comments property of the underlying dataitem through the Metadata of the Appointment (using the MetadataPropertyMappings). I then made a copy of the default xaml for the AppointmentDialogCore (from the xaml in the DefaultStyles directory included in the install) and modified it to access the "Metadata[Comments]".
Also How do i close my custom appointments dialog ?