Hi,
Continuation to http://www.infragistics.com/community/forums/p/95708/474087.aspx#474087
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?
Thanks and Regards,
Nag
Hello Nag,
Thank you for your post.
I am curious, are you setting the StartTimezoneId and EndTimezoneId properties on your Appointments? Also, are you setting the IsTimeZoneNeutral property on your appointments to false? I am currently not seeing the reload as UTC time when opening the appointment dialog, saving the timezone, saving the appointment, and then re-opening the dialog in the application that I have created. I have attached this application to this post. Please test it on your machine.
Regarding the hiding of the TimeZone button in the appointment dialog, I would recommend that you write a style in your App.xaml for AppointmentDialogCore and use an EventSetter to handle the Loaded event of it. This will fire each time the appointment dialog shows. Using the Infragistics Utilities class, and its method GetDescendantFromName, you can obtain a ToggleButton named "TimeZonesButton" from the AppointmentDialogCore. If you set this ToggleButton's visibility to collapsed, you will hide the Timezone button. This is demonstrated in the attached application.
Please let me know if you have any other questions or concerns on this matter.
Sincerely,AndrewAssociate DeveloperInfragistics Inc.www.infragistics.com/support
Hi Andrew,
This is really cool stuff. Thanks a ton.
I was able to add Categories using the string property.
But I am facing one problem with Categories. If I add a category programmatically, I am unable to change the color in run time in categories window. Do you have any suggestion for that?
I am assigning name, description and color to the activitycategory collection and assigning this to dataconnector ActivityCategories collection.
Now, the Major thing about time zones:
I added IsTimeZoneNeutral and Start and end time zones as per your suggestion and carried out some tests.
Example test1:
1. Create an appointment with Start and End time zone ids as "New Zealand Standard Time"
2. Load the TimeZoneInfoResolver with ID as NZST.
3. Now if you see the appointment, it still shows in UTC.
Example test2:
1. Same appointment
2. Load the resolver with UTC time zone.
3. Appointment shows correctly (I have to remove start and end time zones. Otherwise, this also shows wrong results).
Except test2, all other tests fails showing the time either UTC or UTC + 24 hours (if the start and end times are NZST).
Please can you tell me why this is behaving like this?
I am currently investigating into this category color change issue as well as the timezone issue. I will update this forum thread again once I have more information for you on this matter.
Regarding the categories being added in code, I have reproduced this issue you are seeing with the color unable to be set to a new color. This may be expected, but I am not entirely sure just yet. I am going to continue to investigate this, and I will let you know when I have more information for you.
Regarding the time-zones, I am seeing the UTC + x hours behavior that you are referring to in the Appointment dialog window, although it only appears to happen with certain time-zones such as New Zealand Standard Time. I have noticed that if you use "FLE Standard Time" for instance, this doesn't happen. However, I am still unsure of what you are referring to by the TimeZoneInfoResolver. Could you please provide some more detail on what you are referring to by that so that I can verify that the behavior I am seeing is the same that you are seeing?
Please can you tell me if you are able to resolve pro grammatically creating categories and changing colors?
We shall get similar functionality like in Outlook, where we can change the category color after creating and loading it.
It appears that the drop-down for choosing the color picker gets disabled when you create the category from code and that this is by design, but I have found a workaround for you on this matter. If you create a Style that targets ActivityCategoryColorPicker and handle the Loaded event, you can cast the sender of that event to an ActivityCategoryColorPicker object and check its IsEnabled property. If it is false, set it to true, and you will be able to modify the color of your category.
I have attached an updated version of the original sample I had sent you to demonstrate this.
Just checking in, did you have any other questions or concerns on this matter?
Thank you very much for your update. I think colorpicker works with this method.
I am really struck on my current work and I shall be able to send you tomorrow the sample we created for Timezones.
Also, we have couple of test cases where the timezone is failing. For now, I made it to point to local PC time.
Regards,
Sure. I will continue to monitor this forum thread while I await your Timezones sample update.
Just checking in as it has been awhile since I have last heard from you. Did you still require assistance on this matter?
Thanks a ton for your post.
I am having problems with TimeZones as per my last post in http://www.infragistics.com/community/forums/t/96028.aspx?PageIndex=2.
Because of this, I am not able to show Reminders.
Also, I think because of this, on the Calendar View (Today, Week, Work Week, Schedule and Month Views) if today is 28th, till 12pm, 27th is highlighted. :-(. After 12pm, 28th is highlighted.
Also, I have couple of problems. I will start a new post.
Thanks and Regards,Raj
Please can you tell me if I have a workaround for the above problems?
Thanks in advance.
Raj