Hi
I am new to this contorl. i have two tables which one stores data for the schedule and the other stores the owner. When i run my application i get the following error message:
Could you tell me what is the problme please?
I checked the sample and noticed that there are duplicate key in the schedule table.
This is my code:
Private myDS As New DataSet
Private myDSOwner As New DataSet
Me.CalendarInfoSVC.DataBindingsForAppointments.BindingContextControl = Me
Me.CalendarInfoSVC.DataBindingsForAppointments.EndDateTimeMember = myDS.Tables.Item(0).Columns("CheckOutDate").ColumnName
Me.CalendarInfoSVC.DataBindingsForAppointments.OwnerKeyMember = myDS.Tables.Item(0).Columns("ServCatID").ColumnName
Me.CalendarInfoSVC.DataBindingsForAppointments.DataKeyMember = myDS.Tables.Item(0).Columns("ServiceHID").ColumnName
End Sub
Me.CalendarInfoSVC.DataBindingsForOwners.BindingContextControl = Me
Me.CalendarInfoSVC.DataBindingsForOwners.NameMember = myDS.Tables.Item(1).Columns("Description").ColumnName
myDT = MobService.ListServiceAppointments()
myDS.Tables.Add(myDT)
myDS.Tables.Add(myDTOwner)
GetApponitmentSVC()
GetAppointmentOwner()
thanks for your help.
Kamal
Never mind then, my error is something different
I found the solution and know where i went wrong in my code.
this line of code is wrong:
Me.CalendarInfoSVC.DataBindingsForAppointments.SetDataBinding(myDS, String.Empty)
the correct code is:
Me.CalendarInfoSVC.DataBindingsForAppointments.SetDataBinding(myDS.Tables.Items(0)., String.Empty) ''first table in my dataset''
Me.CalendarInfoSVC.DataBindingsForOwners.SetDataBinding(myDS.Tables.Item(1), String.Empty) ''2nd table in my dataset''
I have a dataset with two datatabel which one stores Calendar information and the other stores the ownership.
That did the trick and it loads the information perfectly.
Ownership code:
Me.CalendarInfoSVC.DataBindingsForOwners.BindingContextControl = Me Me.CalendarInfoSVC.DataBindingsForOwners.KeyMember = "ServCatID" Me.CalendarInfoSVC.DataBindingsForOwners.NameMember = "Description" Me.CalendarInfoSVC.DataBindingsForOwners.SetDataBinding(myDS.Tables.Item(1), String.Empty)
Me.CalendarInfoSVC.DataBindingsForOwners.KeyMember = "ServCatID"
Me.CalendarInfoSVC.DataBindingsForOwners.NameMember = "Description"
Me.CalendarInfoSVC.DataBindingsForOwners.SetDataBinding(myDS.Tables.Item(1), String.Empty)
Appointments code:
Me.CalendarInfoSVC.DataBindingsForAppointments.BindingContextControl = MeMe.CalendarInfoSVC.DataBindingsForAppointments.DataKeyMember = ("ServiceHID") Me.CalendarInfoSVC.DataBindingsForAppointments.DescriptionMember = ("Description")Me.CalendarInfoSVC.DataBindingsForAppointments.OwnerKeyMember = ("ServCatID") Me.CalendarInfoSVC.DataBindingsForAppointments.StartDateTimeMember = ("CheckInDate")Me.CalendarInfoSVC.DataBindingsForAppointments.EndDateTimeMember = ("CheckOutDate") Me.CalendarInfoSVC.DataBindingsForAppointments.SubjectMember = ("JobNo") Me.CalendarInfoSVC.DataBindingsForAppointments.SetDataBinding(myDS.Tables.Item(0), String.Empty)
Me.CalendarInfoSVC.DataBindingsForAppointments.DescriptionMember = ("Description")
Me.CalendarInfoSVC.DataBindingsForAppointments.StartDateTimeMember = ("CheckInDate")
Me.CalendarInfoSVC.DataBindingsForAppointments.SubjectMember = ("JobNo")
Me.CalendarInfoSVC.DataBindingsForAppointments.SetDataBinding(myDS.Tables.Item(0), String.Empty)
Good luck.
Thank you. Kamal
I'm having a similar problem:
http://news.infragistics.com/forums/t/1805.aspx
What is ServeCatID? I would love to help but none of your dataFields make sense so going to need a little more info.