Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Calendar
  New Posts New Posts RSS Feed - Cannot retrieve Custom Property correctly
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Cannot retrieve Custom Property correctly

 Post Reply Post Reply
Author
Message
glennj View Drop Down
Newbie
Newbie


Joined: 07 February 2006
Status: Offline
Points: 24
Post Options Post Options   Thanks (0) Thanks(0)   Quote glennj Quote  Post ReplyReply Direct Link To This Post Topic: Cannot retrieve Custom Property correctly
    Posted: 16 May 2006 at 10:39am

I am trying to retrieve a custom property when an event is double-clicked in the calendar.

The following code set-ups up the example event

Dim NewEvent As CalendarEvent, Recurrence As CalendarRecurrencePattern

NewEvent = AxCalendarControl1.DataProvider.CreateEvent

NewEvent.Subject = "Valuation of 51 Adelphi Street, Campbell Park"

NewEvent.StartTime = #5/15/2006 3:00:00 PM#

NewEvent.EndTime = #5/15/2006 4:00:00 PM#

NewEvent.BusyStatus = CalendarEventBusyStatus.xtpCalendarBusyStatusBusy

NewEvent.Description = "Some nice notes here..."

NewEvent.Location = "Campbell Park"

NewEvent.Label = 1

NewEvent.CustomProperties.Property("diaryId") = 14

AxCalendarControl1.DataProvider.AddEvent(NewEvent)

xCalendarControl1.Populate()

 

And this is the sub routine that is called on the double-click

 

Private Sub AxCalendarControl1_DblClick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles AxCalendarControl1.DblClick

Dim HitTest As CalendarHitTestInfo

HitTest = AxCalendarControl1.ActiveView.HitTest

If HitTest.ViewEvent Is Nothing Then

Dim frmDiaryEntry As frmDiaryEntry = New frmDiaryEntry

frmDiaryEntry.Text = "New Diary Entry"

frmDiaryEntry.Show()

Else

Dim frmDiaryEntry As frmDiaryEntry = New frmDiaryEntry

MessageBox.Show(HitTest.ViewEvent.Event.CustomProperties("di aryId"))

frmDiaryEntry.DiaryEntryId = HitTest.ViewEvent.Event.CustomProperties("diaryId")

frmDiaryEntry.Show()

End If

 

End Sub

Problem is I never get the correct value for the custom property. Instead I get a seemingly random 8 digit number!

How can I retrieve the custom property that I'm setting above sucessfully?

thanks.

 

Back to Top
sserge View Drop Down
Moderator Group
Moderator Group


Joined: 01 December 2004
Status: Offline
Points: 1297
Post Options Post Options   Thanks (0) Thanks(0)   Quote sserge Quote  Post ReplyReply Direct Link To This Post Posted: 17 May 2006 at 3:59pm
If your value DiaryEntryId is declared as Integer, it should be working just fine.

Also, second string should look like:
Set NewEvent = AxCalendarControl1.DataProvider.CreateEvent

Do you use VB6?

--
WBR,
Serge


Back to Top
glennj View Drop Down
Newbie
Newbie


Joined: 07 February 2006
Status: Offline
Points: 24
Post Options Post Options   Thanks (0) Thanks(0)   Quote glennj Quote  Post ReplyReply Direct Link To This Post Posted: 18 May 2006 at 12:10pm

Should be, but it doesn't

I'll try get a simple example project to demonstrate up here.

I'm programming in vb.net... but have seen the vb6 example project and am using it for reference.

Back to Top
glennj View Drop Down
Newbie
Newbie


Joined: 07 February 2006
Status: Offline
Points: 24
Post Options Post Options   Thanks (0) Thanks(0)   Quote glennj Quote  Post ReplyReply Direct Link To This Post Posted: 26 May 2006 at 10:18am

OK, here is an example vb.net project demonstrating the error I'm coming across.

Could you please take a look and see what the problem might be?

Many thanks

2006-05-26_101811_CalendarTest.zip

Back to Top
sserge View Drop Down
Moderator Group
Moderator Group


Joined: 01 December 2004
Status: Offline
Points: 1297
Post Options Post Options   Thanks (0) Thanks(0)   Quote sserge Quote  Post ReplyReply Direct Link To This Post Posted: 26 May 2006 at 2:28pm
hmmm, your sample works pretty fine for me.
when I'm double clicking events, message box displays numbers 1, 2, 3 correspondingly.

I'll look further but could you please clarify what is your environment? windows version? locale? any other details?


Back to Top
glennj View Drop Down
Newbie
Newbie


Joined: 07 February 2006
Status: Offline
Points: 24
Post Options Post Options   Thanks (0) Thanks(0)   Quote glennj Quote  Post ReplyReply Direct Link To This Post Posted: 26 May 2006 at 3:29pm

Weird hey! At least my code was correct...

I'm running Windows XP Pro with SP2 and god knows how many random Microsoft updates! .Net 2.0 installed. UK English settings.

Developing in Visual Studio 2003, using Sql Server 2005.

When I click on any calendar entry I get "Hit: 33619969"

Back to Top
glennj View Drop Down
Newbie
Newbie


Joined: 07 February 2006
Status: Offline
Points: 24
Post Options Post Options   Thanks (0) Thanks(0)   Quote glennj Quote  Post ReplyReply Direct Link To This Post Posted: 31 May 2006 at 10:07am

Any update on this problem?

thanks

Back to Top
sserge View Drop Down
Moderator Group
Moderator Group


Joined: 01 December 2004
Status: Offline
Points: 1297
Post Options Post Options   Thanks (0) Thanks(0)   Quote sserge Quote  Post ReplyReply Direct Link To This Post Posted: 03 June 2006 at 2:51pm
Hi,

I believe this problem is already fixed in 10.2 which has been released recently.

--
WBR,
Serge
Back to Top
glennj View Drop Down
Newbie
Newbie


Joined: 07 February 2006
Status: Offline
Points: 24
Post Options Post Options   Thanks (0) Thanks(0)   Quote glennj Quote  Post ReplyReply Direct Link To This Post Posted: 05 June 2006 at 5:44am

I'm running Xtreme Suite ActiveX v9.81, how can I get hold of the fixed version?

My product downloads have expired etc and I really want a working version!

Back to Top
sserge View Drop Down
Moderator Group
Moderator Group


Joined: 01 December 2004
Status: Offline
Points: 1297
Post Options Post Options   Thanks (0) Thanks(0)   Quote sserge Quote  Post ReplyReply Direct Link To This Post Posted: 05 June 2006 at 9:28am
hi glennj,

Please submit a request to get fixed version to IssueTrack support area, and I'll attach fixed version for you there.

--
WBR,
Serge
Back to Top
glennj View Drop Down
Newbie
Newbie


Joined: 07 February 2006
Status: Offline
Points: 24
Post Options Post Options   Thanks (0) Thanks(0)   Quote glennj Quote  Post ReplyReply Direct Link To This Post Posted: 05 June 2006 at 9:36am

Do you mean the Support Request Form?

Thanks

Back to Top
sserge View Drop Down
Moderator Group
Moderator Group


Joined: 01 December 2004
Status: Offline
Points: 1297
Post Options Post Options   Thanks (0) Thanks(0)   Quote sserge Quote  Post ReplyReply Direct Link To This Post Posted: 05 June 2006 at 9:42am
yep, it'll allow us to attach a fix for you in a secured way...
Back to Top
glennj View Drop Down
Newbie
Newbie


Joined: 07 February 2006
Status: Offline
Points: 24
Post Options Post Options   Thanks (0) Thanks(0)   Quote glennj Quote  Post ReplyReply Direct Link To This Post Posted: 07 June 2006 at 1:21pm

Excellent, I now have the latest version of the controls and it works perfect...

So on to another question

Rather than remove my controls and add them again using the latest version (which would cause a headache), what is the simplest way up upgrading my VB.Net project to use the latest version of the controls?

I presume I remove the references and re-add them... but what would the correct reference be for the controls? If I simply select the Calendar control from the COM list it doesn't work, and doesn't look like the same file (in fact there were 2 references before).

thanks again

Back to Top
sserge View Drop Down
Moderator Group
Moderator Group


Joined: 01 December 2004
Status: Offline
Points: 1297
Post Options Post Options   Thanks (0) Thanks(0)   Quote sserge Quote  Post ReplyReply Direct Link To This Post Posted: 08 June 2006 at 12:57pm
After you installed a new version and opened your project in VB.NET environment, it should ask you something like: "A component has a newset version, would you like to upgrade your solution?", and pressing "Yes" would resolve this problem...

Otherwise, you can reinsert the control under the same name after adding a new version to the toolbox.

And the last solution is to ask for an upgrade utility in support area

--
WBR,
Serge


Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.156 seconds.