Hi,
I am using attached XAML ResourceDictionary file (extension changed because of file upload types) as appointment class.
In this, I have added a ListView with a textbox and combobox and trying to populate data using two buttons.
Setup:
1. Added this XAML file to my project.
2. Added a class in this ScheduleResource XAML file for code behind.
3. Added a listview and two buttons in ScheduleResource XAML file.
4. Now the click events for this two buttons are added in the code behind class.
5. I created another class to map the Appointment class properties.
6. I have another Window which has xamMonthView say this class is MonthCalendar.
7. Now, when I load and open the month view -> Appointment, I can see my ListView and two buttons.
But when I try to add items to the listView they are not getting added.
Please can you tell me what I am missing here?
Regards,
Raj
Also, it would be greatly helpful to me if I can know how to get the current instance of the Appointment dialog.
Like, if I double click on a xamMonthView, how can I get the pop-up appointment dialog window?
Hello Nag,
Thank you for your posts.
I have been looking into it and I am not completely sure that I understand correctly your requirements and what you try to achieve. Would you please provide me with more details about:
- What items should be added to the listview?
- Should the appointments, that are in the MontView, be added to the ListView?
- Should they be added when the user clicks on of the two button mentioned in your initial post?
Looking forward to hearing from you.
Hi Zhivko,
I tried it today and it just worked fine.
Simply great and thanks a ton for that. I am looking at loading and handling of deleting the appointments.
I will post further queries if any, but for now all good.
Thanks again.
Nag
I slightly modified your code to fit my purpose.
I am trying to save appointment with the list values but it is always coming null.
1. Run the application.
2. Put a break point in Save Click handler.
3. Put a break point in the MyList property.
4. Load the application and add the list to the appointment.
5. Save the changes.
6. Click on Save button. It shows 2 appointments in the list. But MyList is always NULL.
I tried different combinations but in vain.
Also, I need below clarification. Please help me on this.
1. When I add the list, I would want to save and close. But that button is not enabled until i change subject or other default property. How can I do this?
2. I used XamMonthView. After saving the appointment, I can use keyboard "Delete" key and delete the appointment. This event I can capture using XamMonthView's "KeyUp" event. But if I delete that using the Appointment dialog's "Delete" button, which event I need to handle?
3. Also, from your example, when I load the appointment, it shows in the wrong date. In the example given, start and end dates are 8th April. But when I check that in Appointment window, it shows 7th April. Please can you tell me is this expected?
Thanks a ton for your time and replies.
Thank you for your post.
I have been further investigating your requirements s and your issue and I am contacting with our development team. It seems that the reason for MyList property to be always null is because the AppoitmentDialogue don’t manipulate the properties of DataItem directly, while editing them. Instead of this, it manipulate a copy of activity while editing in dialog. When saving the dialog, the information in that copy is pushed back into the source activity instance and its associated DataItem. So the clone of MyList property has null and then when saving it is pushing the null back into the source activity.
What I can suggest, in order to be able to achieve the behavior that you want is to get the ActivityDialogCore by using our Utilities class in the event handler for Add button. You can update the dialog by setting the Activity.Metadata[“MyList”] to your listview. When update the dialog, the saveAndclose button will be enable, as you wish. About your second question, you can handle Unloaded event of AppointmentDialogCore that occurs when the element is removed from within an element tree of loaded elements. About your third question, I could not manage to reproduce this behavior, on my side it shows the date correctly. Also you can create a UserControl and put in it template for the ActivityDialogCore, in order to be able to hook events of the objects within. I modified the last sample application to show you how you can implement the functionalities that you are looking for.
Please let me know if you need any further assistance on the matter.
Thank you very much for the update.
It seems working fine but I need some time to validate all scenarios.
If I have a XamOutlookCalendarView control, the ActivityAdded/Changed/Modified is getting called first than Appointment Window unloaded and loaded. So I am checking on getting those values.
One issue I am facing now is, the date time is still a problem. When I save the appointment, it is reloading as UTC time.
1. What I want is, I want to disable "Time Zone" button and load, save, modify times in local time zones.
Please can you tell me how can I achieve that?
2. Also, I want to create a new appointment on a button click. Is it possible in this Application?
I tried instantiating AppointmentDialogCore but don't know how to bring up that UI and assign a string ID value (automatically from Infragistics).
Thank you for the feedback.
Please do not hesitate to let me know if you have any further questions regarding how to add ListView in Appointment dialog.
Regarding the other questions that you have I can suggest to create a separate thread for each of them. This way the communication would be easier and there would be no confusion about the issues. Also other community that have similar issues would be able to benefit from the threads too.
Thank you for using Infragistics controls!