Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Index was out of range. Must be non-negative and l (Read 2573 times)
willywig
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 5
Joined: Mar 17th, 2008
Index was out of range. Must be non-negative and l
Aug 11th, 2009 at 10:39pm
Print Post  
Using the following code I can only add one Contact to the system after that I get
Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index

Code
Select All

For Each orow As DataRow In oDT.Rows

            Try



                contact1 = New MindFusion.Scheduling.Contact
                contact1.Id = orow.Item("empid")
                contact1.Name = orow.Item("empid") & " - " & orow.Item("Firstname") & " " & orow.Item("lastname")
                contact1.LastName = CType(orow.Item("lastname"), String)

                contact1.FirstName = orow.Item("empid") & " - " & CType(orow.Item("Firstname"), String)
                Me.Calendar.Contacts.Add(contact1)
            Catch ex As Exception
                Console.WriteLine(contact1.Name & "---" & ex.Message)
            End Try
           Next
 

  
Back to top
 
IP Logged
 
willywig
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 5
Joined: Mar 17th, 2008
Re: Index was out of range. Must be non-negative a
Reply #1 - Aug 11th, 2009 at 10:54pm
Print Post  
only happens when
 
Code
Select All
 Me.calendar.CurrentView = MindFusion.Scheduling.WinForms.CalendarView.Timetable 

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


MindFusion support

Posts: 1783
Joined: Jul 20th, 2005
Re: Index was out of range. Must be non-negative a
Reply #2 - Aug 12th, 2009 at 5:53am
Print Post  
I am trying with your code here and it is working without errors. Can you post the stack trace of the exception as well?

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