using xtreme calendar control in IE |
Post Reply |
Author | |
Nataraj
Newbie Joined: 02 September 2005 Location: India Status: Offline Points: 15 |
Post Options
Thanks(0)
Posted: 02 September 2005 at 6:20am |
Hi, I want to use the control in internet explorer. So i wrote the following piece of code in the load event. Sub Window_OnLoad() Note that ccJobs is the name given in the object tag. The html is as follows: <body> When i run this code everything works fine and iam able to see 2 events. I want to prevent the events from being edited, so i added the event BeforeEditOperation to the code, so that using the CancelOperation parameter, i can prevent the event from being edited. I just added the following piece of code. Sub ccJobs_BeforeEditOperation(byval OpParams , CancelOperation) After adding the above procedure, if i try to run , i get an error at "If .DataProvider.Create() Then" line saying object does not support this property or method. The following is the complete source in the sample html page <html> When i remove the events from the code, it does not give any error and whenever i add any event code i get an error. Can anyone help me in finding the reason for the error and how to correct it? |
|
sserge
Moderator Group Joined: 01 December 2004 Status: Offline Points: 1297 |
Post Options
Thanks(0)
|
Hi,
You are using incorrect ID: 1CC36260-AD0A-47AC-95EB-B54A218A7B9C It is not a class id. The correct class ID is: B4252697-58EA-4784-B25E-95223304C93C -- WBR, Serge |
|
Nataraj
Newbie Joined: 02 September 2005 Location: India Status: Offline Points: 15 |
Post Options
Thanks(0)
|
Iam using the correct id, u can look at the code that i have pasted above, it is <body> this is not 1CC36260-AD0A-47AC-95EB-B54A218A7B9C as you have mentioned in the answer. Moreover used visual interdev to add the component to the toolbox and when i dragged and dropped it into the designer, it generated the code with the correct class id. If it was incorrect class id then the control itself should not appear when i run the code. |
|
sserge
Moderator Group Joined: 01 December 2004 Status: Offline Points: 1297 |
Post Options
Thanks(0)
|
Hi,
Sorry, you're correct. May be the problem is in the following?
-- WBR, Serge |
|
Nataraj
Newbie Joined: 02 September 2005 Location: India Status: Offline Points: 15 |
Post Options
Thanks(0)
|
Hi, The default way of passing parameters in vbscript is ByRef and hence is optional. I have tried all of these and still it does not work. Since the events does not work, it cannot be said that it works in IE. If it is possible please post some code which handles events and works in IE. Edited by Nataraj |
|
sserge
Moderator Group Joined: 01 December 2004 Status: Offline Points: 1297 |
Post Options
Thanks(0)
|
Hi,
What do you mean by 'events does not work' ? Do you receive ccJobs_BeforeEditOperation event ? The first what I did - placed alert message in the handler and it works.
Also, could you please specify what is your environment? Windows version: IE version: -- WBR, Serge |
|
Nataraj
Newbie Joined: 02 September 2005 Location: India Status: Offline Points: 15 |
Post Options
Thanks(0)
|
What i meant by 'events does not work' is that the moment i put the empty event declarations in the code and run, i get an error. If i remove the event declaractions then it works. I have mentioned this in the first post, you can paste that code into notepad, save it as .htm and then try to run it, it gives error. After this remove the event declarations and try to run, you will see 2 events getting created. I use Windows Xp Professional SP2 and IE 6.0 with SP2 I tried it in IE 5.0 and the events fire, but even if CancelOperation is set to true, it does not work, i.e. even after setting the property to true, i can resize, edit text, move, copy, create new events etc... Also there is no option to specify the font and forecolor for each event. No option to print the control. No option to specify custom background color for the event. When MeetingFlag of the event is set to true instead of icon "E" appears. When PrivateFlag of the event is set to true instead of icon "B" appears.
Edited by Nataraj |
|
Nataraj
Newbie Joined: 02 September 2005 Location: India Status: Offline Points: 15 |
Post Options
Thanks(0)
|
Hi, Is there a way of making the events readonly without using the BeforeEditOperation and IsEditDisabled events? i.e. is there any property setting which the event becomes readonly i.e. user should not be able to stretch / shrink the event. |
|
sserge
Moderator Group Joined: 01 December 2004 Status: Offline Points: 1297 |
Post Options
Thanks(0)
|
Hi Nataraj,
To resolve this problem in the recent 9.80 release we've added one more property to OpParams object. Now you can cancel operations in the following way: OpParams.DisableCancelOperation = True Let me know whether this would work for you. -- HTH, Serge |
|
Nataraj
Newbie Joined: 02 September 2005 Location: India Status: Offline Points: 15 |
Post Options
Thanks(0)
|
Hi, I tried to find DisableCancelOperation by opening the object browser and was not able to find it, i also searched the help file but could not find it. To Which object does that property belong to? I also could not find that property in the CalendarOptions object. I have downloaded the latest version i.e. 9.8.0.0. OpParams is the parameter that can be seen in BeforeEditOperation event and it does not contain that property, moreover the type is ByVal which means that the value cannot be changed. Even if it is ByRef then IE does not support it and hence user can stretch / shrink the events even though the CancelOperation is set to true in BeforeEditOperation event. |
|
sserge
Moderator Group Joined: 01 December 2004 Status: Offline Points: 1297 |
Post Options
Thanks(0)
|
Nataraj,
This member is hidden. It's special case for IE. VB and C# clients should use CancelOperation event parameter. Just enable "Show Hidden members" in the object browser. It is member of CalendarEditOperationParameters object. Just use
as it was mentioned early. Of course OpParams is ByVal, it is a pointer to object. ByRef for object suppose that you have to (or may to) create your own one and return it. In our case you need only access to object properties. -- WBR, Serge |
|
Nataraj
Newbie Joined: 02 September 2005 Location: India Status: Offline Points: 15 |
Post Options
Thanks(0)
|
Hi, Is there a way to programatically scroll the control vertically? Also is there a way to set a particular date as the first date of the calendar control in month view? For example if i use showday method and pass 10/23/2005 as the parameter and use Options.FirstDayOfTheWeek property to set the first day of week as sunday (10/16/2005), i see 10/16/2005 as the first date. Is it possible to show 10/23/2005 as the first day of the calendar control or any specific date as the first visible day of the calendar control? Edited by Nataraj |
|
sserge
Moderator Group Joined: 01 December 2004 Status: Offline Points: 1297 |
Post Options
Thanks(0)
|
Hi,
The ShowDay() work depends on options state: Options.FirstDayOfTheWeek property Options.MonthViewCompressWeekendDays Set these options firstly and apply them, than call ShowDay: EXAMPLE: CalendarControl.Options.FirstDayOfTh eWeek = 1 CalendarControl.Options.MonthViewCom pressWeekendDays = False ' *** ' to apply options before calculating first visible date in ShowDay call ' otherwise old options will be used in calculation ' *** CalendarControl.Populate CalendarControl.MonthView.ShowDay #10/23/2005# if Options.MonthViewCompressWeekendDays = True ShowDay #10/23/2005# will set (10/17/2005) as first visible date. -- HTH, Serge |
|
Nataraj
Newbie Joined: 02 September 2005 Location: India Status: Offline Points: 15 |
Post Options
Thanks(0)
|
Hi, I tried the same as you have replied, but this is the result i got for the following dates Date First Visible Date 10/23/2005 - 10/23/2005 10/24/2005 - 10/24/2005 10/25/2005 - 10/19/2005 10/26/2005 - 10/22/2005 10/27/2005 - 10/22/2005 10/28/2005 - 10/22/2005 10/29/2005 - 10/29/2005 Am i missing something? This is the code that iam using With CalendarControl1 .Options.EnableInPlaceCreateEv ent = False --------------------------- .ViewType = 3 .Populate .ActiveView.ShowDay ldtCurr, True End With I have tried all possible ways, but am not able to set the first visible date to a particular date. It works in some cases and does not work in some cases, please help. Edited by Nataraj |
|
sserge
Moderator Group Joined: 01 December 2004 Status: Offline Points: 1297 |
Post Options
Thanks(0)
|
Hi,
Looks like you've found a bug in our help. FirstDayOfTheWeek - is not an enum (flag), but a simple index: 1 = Sunday, 2 = Monday, 3 = Tuesday, 4 = Wednesday, 5 = Thursday, 6 = Friday, 7 = Saturday So, just use the following:
-- WBR, Serge |
|
Nataraj
Newbie Joined: 02 September 2005 Location: India Status: Offline Points: 15 |
Post Options
Thanks(0)
|
Hi, Is there a way to color a particular cell with custom background color? |
|
sserge
Moderator Group Joined: 01 December 2004 Status: Offline Points: 1297 |
Post Options
Thanks(0)
|
Hi,
No, you can't set color a particular cell, there is a possibility only to customize colors for work and non-work cells for day view. -- WBR, Serge |
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |