This is a migrated thread and some comments may be shown as answers.

My appointment is showing in Scheduler When Change Resouce Type Foregin Key Field

0 Answers 20 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Chandan Kumar
Top achievements
Rank 1
Chandan Kumar asked on 19 Jun 2010, 05:42 AM
Hello Sir,

My appointment is showing  in Scheduler control. But When I Chnge 

ForeignKeyField at run time Then Appointment Not Showing in Scheduler Records Come In Our Dataset ant its bind Successfull bit Does Not Show In Scheduler. Why Please Help Me.

My Source Code :

 

ds = dl.FillDataSet(

 

CommandType.StoredProcedure, "uspGetAppointments", HashIn);

 

 

 

if (ds.Tables[0].Rows.Count > 0)

 

{

 

RadScheduler1.SelectedDate = CalApp.SelectedDate;

RadScheduler1.DayStartTime =

 

TimeSpan.Parse(ds.Tables[0].Rows[0].ItemArray[0].ToString());

 

RadScheduler1.DayEndTime =

 

TimeSpan.Parse(ds.Tables[0].Rows[0].ItemArray[1].ToString());

 

 

RadScheduler1.MinutesPerRow =

 

int.Parse(ds.Tables[0].Rows[0].ItemArray[2].ToString());

 

RadScheduler1.TimeLabelRowSpan = 60 /

 

int.Parse(ds.Tables[0].Rows[0].ItemArray[2].ToString());

 

RadScheduler1.DataKeyField =

 

"AppointmentId";

 

RadScheduler1.DataStartField =

 

"FromTime";

 

RadScheduler1.DataEndField =

 

"ToTime";

 

RadScheduler1.DataSubjectField =

 

"Subject";

 

RadScheduler1.GroupBy =

 

"Resource";

 

RadScheduler1.DataDescriptionField =

 

"StatusColor";

 

 

RadScheduler1.ResourceTypes.Clear();

 

 

ResourceType rt = new ResourceType("Resource");

 

rt.DataSource = ds.Tables[2];

rt.KeyField =

 

"ResourceId";

 

 

 

if (ddlFacility.SelectedValue == "0")

 

{

rt.ForeignKeyField =

 

"FacilityId";

 

}

 

 

else

 

 

 

 

 

 

{

rt.ForeignKeyField =

 

"DoctorId";

 

}

rt.TextField =

 

"ResourceName";

 

RadScheduler1.ResourceTypes.Add(rt);

 

RadScheduler1.DataSource = ds.Tables[1];

RadScheduler1.DataBind();

 

 

Thanks
Chandan

No answers yet. Maybe you can help?

Tags
Scheduler
Asked by
Chandan Kumar
Top achievements
Rank 1
Share this question
or