I have problem with:
System.NullReferenceException was unhandled Message="Object reference not set to an instance of an object." Source="MindFusion.Scheduling" StackTrace: at MindFusion.Scheduling.Item.GetHashCode() at MindFusion.Scheduling.WinForms.x30788aa4e2c76c13.GetHashCode(Item a) at System.Collections.Generic.Dictionary`2.FindEntry(TKey key) at System.Collections.Generic.Dictionary`2.ContainsKey(TKey key) at MindFusion.Scheduling.WinForms.Calendar.xb33e7b23311adcf5(Item xccb63ca5f63dc470) at MindFusion.Scheduling.WinForms.Calendar.x4342ef569299dc36(ICollection xf8b54ce7724a27f2) at MindFusion.Scheduling.WinForms.Calendar.OnMouseMove(MouseEventArgs e).....
This problem occurs when I try to create new item - appointment with mouse on calendar AFTER I loaded old appointments from database...
there is sample code I used...
by _Load:
Dim app As New Appointment() app.Id = DataGridView_Rezervacije.Rows(iBroj).Cells(0).Value app.HeaderText = DataGridView_Rezervacije.Rows(iBroj).Cells(0).Value & " / Kupac" app.DescriptionText = "Comment" app.Location = Calendar_Glavni.Locations(jBroj) app.StartTime = New DateTime(Int(Format(varDolazak, "yyyy")), _ Int(Format(varDolazak, "MM")), _ Int(Format(varDolazak, "dd")), 14, 0, 0) app.EndTime = New DateTime(Int(Format(varOdlazak, "yyyy")), _ Int(Format(varOdlazak, "MM")), _ Int(Format(varOdlazak, "dd")), 10, 0, 0) Calendar_Glavni.Schedule.Items.Add(app) Calendar_Glavni.ItemSelection.Clear() Calendar_Glavni.ItemSelection.Add(app)
by _ItemCreated:
e.Item.Style.FillColor = Color.Yellow e.Item.HeaderText = "New" e.Item.DescriptionText = "Tata Tomy / " & FormatDateTime(Now, DateFormat.GeneralDate) e.Item.StartTime = New DateTime(Int(Format(e.Item.StartTime, "yyyy")), _ Int(Format(e.Item.StartTime, "MM")), _ Int(Format(e.Item.StartTime, "dd")), _ 14, 0, 0) e.Item.EndTime = New DateTime(Int(Format(e.Item.EndTime, "yyyy")), _ Int(Format(e.Item.EndTime, "MM")), _ Int(Format(e.Item.EndTime, "dd")), _ 10, 0, 0)
Can you help me?
Tomy
|