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

Resources manually

0 Answers 26 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Support ATT
Top achievements
Rank 1
Support ATT asked on 13 Aug 2018, 09:09 AM

Hi

I bind Appointments manually with resources, but i can't see the added appointment in radscheudler.

 

RadScheduler1.Resources.Clear();
RadScheduler1.ResourceTypes.Clear();
ResourceType UserName = new ResourceType("User");
UserName.ForeignKeyField = "TEILNEHMERID";
UserName.KeyField = "TEILNEHMERID";
UserName.TextField = "NACHNAME";
UserName.DataSource = dsTLNINGRP_VIEW.Tables[0].DefaultView;
RadScheduler1.ResourceTypes.Add(UserName);
RadScheduler1.GroupBy = "User";
//RadScheduler1.GroupingDirection = GroupingDirection.Vertical;
RadScheduler1.DataSource = ds.Tables[0].DefaultView;
bindHolidays(dsTLNINGRP_VIEW);
RadScheduler1.DataBind();

Here is the bindHolidays Method

 

 

Appointment appointment = new Appointment();
appointment.ID = ds.Tables[0].Rows[i]["TEILNEHMERID"].ToString();
appointment.Subject = WAMResource.Abwesend;
appointment.Attributes["TYP"] = "A"; //Abwesend Custom Attributes
appointment.Attributes["BACKCOLOR"] = Color.Red.ToString();
appointment.BackColor = Color.Red;
appointment.Resources.Add(new Telerik.Web.UI.Resource("User", ds.Tables[0].Rows[i]["TEILNEHMERID"].ToString(), "Toprak"));
appointment.Start = DateTime.Parse(ds.Tables[0].Rows[i]["STARTTIME"].ToString());
appointment.End = DateTime.Parse(ds.Tables[0].Rows[i]["ENDTIME"].ToString());
RadScheduler1.InsertAppointment(appointment);

 

No answers yet. Maybe you can help?

Tags
Scheduler
Asked by
Support ATT
Top achievements
Rank 1
Share this question
or