Resources manually

1 posts, 0 answers
  1. Support ATT
    Support ATT avatar
    68 posts
    Member since:
    Nov 2004

    Posted 13 Aug 2018 Link to this post

    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);

     

Back to Top