Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Same Key exception (Read 3714 times)
JayCub
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 3
Joined: Sep 8th, 2010
Same Key exception
Sep 8th, 2010 at 6:19pm
Print Post  
I have followed the Scheduling Tutorial 2: Creating Recurrent Items.

I'm getting an ArgumentException: {"An entry with the same key already exists."}

here is part of my code:

JobNumber = JobInfo.Item(c).ToString
SubmitDate = JobInfo.Item(c + 1).ToString
QuotedDate = JobInfo.Item(c + 2).ToString

jobA.Id = JobNumber
jobA.HeaderText = JobNumber
jobA.DescriptionText = JobNumber
jobA.StartTime = SubmitDate
jobA.EndTime = QuotedDate
Me.Calendar2.Schedule.Items.Add(jobA)


any help would be great
or maybe where I could find some VB examples.
Thanks
« Last Edit: Sep 8th, 2010 at 9:36pm by JayCub »  
Back to top
 
IP Logged
 
Meppy
God Member
*****
Offline


MindFusion support

Posts: 1783
Joined: Jul 20th, 2005
Re: Same Key exception
Reply #1 - Sep 9th, 2010 at 6:10am
Print Post  
You have to ensure that the Id of an appointment is unique within the same schedule. Adding another appointment with the same Id can produce this error.

Regards,
Meppy
  
Back to top
 
IP Logged
 
Meppy
God Member
*****
Offline


MindFusion support

Posts: 1783
Joined: Jul 20th, 2005
Re: Same Key exception
Reply #2 - Sep 9th, 2010 at 10:52am
Print Post  
The restriction all items in the Schedule to have unique Id's have been removed. You can try the version from the link below:

https://mindfusion.eu/_pln_trial/MindFusion.Scheduling.5.1.1a.zip

Let me know if this helps.

Regards,
Meppy
  
Back to top
 
IP Logged
 
JayCub
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 3
Joined: Sep 8th, 2010
Re: Same Key exception
Reply #3 - Sep 9th, 2010 at 1:26pm
Print Post  
Great got it to work with out the exception.
nothing is showing up.

I change the theme to "Silver" = nothing
I change the theme to "Vista" = showing

How can I get the "Silver" theme to work?
  
Back to top
 
IP Logged
 
Meppy
God Member
*****
Offline


MindFusion support

Posts: 1783
Joined: Jul 20th, 2005
Re: Same Key exception
Reply #4 - Sep 9th, 2010 at 1:49pm
Print Post  
By default the day headers in the Silver theme occupy the entire cell leaving no room for the items. To reduce the size of the day headers, use the MonthSettings.DaySettings.HeaderSize property. For example, the following code switches to the Silver theme and sets the size of the day headers to 20:

Code
Select All
calendar1.Theme = MindFusion.Scheduling.WinForms.ThemeType.Silver;
calendar1.MonthSettings.DaySettings.HeaderSize = 20; 


Let me know if this helps.

Regards,
Meppy
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint