Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
315
How use DataBindingsForAppointments.SetDataBinding with object list
posted

Hi,

       im using UltraTimeLineView and i cant bind my data.  

This is my code :

 List<Indisponibilite> listIndisponibilites = new List<Indisponibilite>();
 List<Groupe> listGroupes = new List<Groupe>();

listGroupes.Add(new Groupe(1, 1, "A1", "Beauharnois", 15101));
listGroupes.Add(new Groupe(16, 16, "A1", "Beauharnois", 15101));
ListGroupes.Add(new Groupe(20, 20, "A1", "Beauharnois", 15101));
listGroupes.Add(new Groupe(21, 21, "A1", "Beauharnois", 15101));

listIndisponibilites.Add(new Indisponibilite(1,"11-17952",listGroupes[0], DateTime.Parse("2012-01-03 07:00:00"),DateTime.Parse("2012-01-03 07:00:00")));
listIndisponibilites.Add(new Indisponibilite(2, "09-18994", listGroupes[1], DateTime.Parse("2011-10-17 07:00:00    "), DateTime.Parse("2011-11-11 17:00:00")));
listIndisponibilites.Add(new Indisponibilite(3, "10-25782", listGroupes[2], DateTime.Parse("2011-10-20 06:30:00"), DateTime.Parse("2011-10-20 18:30:00")));
listIndisponibilites.Add(new Indisponibilite(4, "10-25810", listGroupes[2], DateTime.Parse("2012-01-25 06:30:00"), DateTime.Parse("2012-01-25 21:00:00")));
listIndisponibilites.Add(new Indisponibilite(5, "09-18238", listGroupes[3], DateTime.Parse("2011-10-18 06:30:00"), DateTime.Parse("2011-10-21 18:30:00")));


this.ultraCalendarInfo.DataBindingsForOwners.SetDataBinding(listGroupes, "Groupe");
this.ultraCalendarInfo.DataBindingsForOwners.KeyMember = "Identifiant";
this.ultraCalendarInfo.DataBindingsForOwners.NameMember = "Nom";

this.ultraCalendarInfo.DataBindingsForAppointments.SetDataBinding(listIndisponibilites, String.Empty);
this.ultraCalendarInfo.DataBindingsForAppointments.SubjectMember = " ";
this.ultraCalendarInfo.DataBindingsForAppointments.StartDateTimeMember = "DateDebut";
this.ultraCalendarInfo.DataBindingsForAppointments.EndDateTimeMember = "DateFin";
this.ultraCalendarInfo.DataBindingsForAppointments.DataKeyMember = "Identifiant";

....

 

when i execute de code ... i see nothing in my UltraTimeLineView.

My ultraCalendarInfo is link to my UltraTimeLineView.

Its work if i use Data set and DataTable but i want know how its work with object list.

 

Thanks