In the WebDayView and WebMonthView is there a way to change the default appearance of appointments? For example I want to add an icon that would appear to the left of the appointment. Also I want to hyperlink the location such clicking it would take me to another page on my web app. Is there a way to do this?
Thanks,
George
Hello.
If you want to have your own page, when creating appointment, then you need to create a custom appointment. You cannot exactly redirect to some other page and expect that the information from your custom appointment page can be related to the WebSchedule control. That's why you can inherit the Appointment class and create your own custom one. Please follow that tutorial to achieve that. This will allow you to add additional properties of the Appointment that are different from the those that are build in the WebSchedule.
After all there is a way to redirect to a custom page URL, but I will not recommend that. You can attach to the client-side event ActivityDialogOpening and then redirect to your page. See that last post in that forum thread.
As far as about the custom style of the WebMonthView, I can suggest you several options. First of all you can modify styles images of each of the Appointments by defining them in the ASP.NET page (see the image below).
So you can choose your own image and using CSS styles to place in on the left side of the appointment. You can also add styles to the individual Appointment - forum post.
Another option for Appointment customization can be using the AppointmentFormatString property. See this forum post for more information.
If you have some other information, don't hesitate to ask. Thank you for using our products.
Best regards,
Nikolay Alipiev
Hello,
I am still following your case. Have you been able to resolve the issue?
If you have any concerns or questions, please feel free to contact me, I will be glad to help you.
Thank you for choosing Infragistics components!
HI Nikolay,
Your previous response helped quite and bit and I've read the post that you linked and have started down the road of using the AppointmentFormatString. The post indicates that I should be able to use my own custom fields in the AppointmentFormatString but I'm not having much luck. I've derived a class from WebScheduleInfo and have added to it my own custom format tag.
public class FixtureScheduleInfo : Infragistics.WebUI.WebSchedule.WebScheduleInfo
{
public static string FormatTag_TYPEICONPATH = "<TYPEICONPATH>";
public FixtureScheduleInfo() : base()
}
I've also made sure that my aspx file is using my FixtureScheduleInfo and that my WebDayView and WebMonthView are referencing it as their WebScheduleInfoID. For my appointments I've derived a class from Appointment and have added a string property for TYPEICONPATH. I've also changed the AppointmentFormatString for my WebDayView and WebMonthView to "<SUBJECT> - <TYPEICONPATH>". The result is that though the subject appears as I would expect. the TYPEICONPATH doesn't display. When I look at it in the IE javascript debugger it looks like the <TYPEICONPATH> is being interpreted as HTML. It looks like that whatever is responsible for replacing the format tags with the values from the appointments is skipping over my custom format tag. Is there something that I'm missing about how this should work? Any assistance that you can provide would be greatly appreciated.
Thanks again,
Hi, George.
I spent some more time on this and this is the result of my research in the WebSchedule control code.
It's not possible to add custom tag and then expect to work. This is because you are defining the TYPEICONPATH constant, but then it should be replaced dynamically by some logic with the real image source. Even defining the tag and then defining real time source image, there isn't a code to replace one with another. So then I've tried to extend either the WebScheduleInfo (as you did), and also WebDayView (as you are going to see in your sample that I've changed a bit), but unfortunately those methods, that replace tags, are internal and static and it's not easy to be overridden and changing them will break the functionality. This is approved also by the following forum post. So sorry that I've put you in the wrong direction in the beginning.
As it said in the same post, the solution can be to use a tag that is not needed, like DESCRIPTION for example. You can check the sample that I've attached you, that is using the same approach from my previous answer, plus using the DESCRIPITON tag, and then we achieve something like dynamic changing of the image. I've also applied a class on that image, so that it can be styled.
I think this is the best we can do with the current implementation of the WebSchedule I hope it fits your needs. The other option is to log a Product Idea at that site. The Product Ideas site allows you to suggest new product features, new functionalities in existing products and controls, and even request new controls and products altogether. Members of the Infragistics Community then vote for the features and suggestions they want to see added to the products, resulting in the most popular features bubbling up to the top. When planning new releases, our Product Management team will look at the most popular features and use your feedback to prioritize upcoming work.
I will wait for your feedback.
Thank you,
I will try to find the what is the problem with the TYPEICONPATH and will give you more detailed information.
Thanks for the patience!
Nikolay
Thanks Nikolay,
I replaced the AppointmentFormatString as instructed and I was able to see the FC Barcelona image, however the value that I put in each appointment for TYPEICONPATH still isn't showing. Each appointment will have a different TYPEICONPATH value which was why I was going with a custom format tag. Is there something else I can try? I appreciate the time that you've been spending on this.
George Turner
Can you try in the sample that you've sent me to replace the AppointmentFormatString property with the following value:
Then you can use the .custom-icon class to apply the position on the element.
Thanks for the sample. I had some problems running the sample, but I will extract your code and will isolate the needed code. I will write you when I have the solution or when I found the reason for not getting your custom tag. Thank you for the patience!