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

Resources doesn't appears

1 Answer 27 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Rolando
Top achievements
Rank 1
Rolando asked on 13 Oct 2010, 02:56 AM
Hi,

In my scheduler I have one resource, but in the Views (DayView, WeekView, etc.) doesn't appear in the header of the control.  But when I editing an appointment, the Resources appears like a ComboBox.  Why I can't view my Resource in the DayView??

This is my code (is very simple):

    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack) cargarSalones();
    }

    void cargarSalones()
    {
        DataSet ds = new DataSet();
        DataTable dtSalones = new DataTable("salones");
        DataTable dtDetalle = new DataTable("detalle");

        dtSalones.Columns.Add(new DataColumn("salon", typeof(System.Int32)));
        dtSalones.Columns.Add(new DataColumn("nombre", typeof(System.String)));

        dtDetalle.Columns.Add(new DataColumn("salon", typeof(System.Int32)));
        dtDetalle.Columns.Add(new DataColumn("asunto", typeof(System.String)));
        dtDetalle.Columns.Add(new DataColumn("inicio", typeof(System.DateTime)));
        dtDetalle.Columns.Add(new DataColumn("fin", typeof(System.DateTime)));

        DataRow row = dtSalones.NewRow();
        row["salon"] = 1;
        row["nombre"] = "Salon 101";
        dtSalones.Rows.Add(row);

        DataRow row2 = dtSalones.NewRow();
        row2["salon"] = 2;
        row2["nombre"] = "Salon 202";
        dtSalones.Rows.Add(row2);

        DataRow row3 = dtDetalle.NewRow();
        row3["salon"] = 1;
        row3["asunto"] = "Curso A101 - Carrera LAE";
        row3["inicio"] = "08:00";
        row3["fin"] = "08:59";
        dtDetalle.Rows.Add(row3);

        DataRow row4 = dtDetalle.NewRow();
        row4["salon"] = 2;
        row4["asunto"] = "Curso B02 - Carrera II";
        row4["inicio"] = "10:00";
        row4["fin"] = "10:59";
        dtDetalle.Rows.Add(row4);

        ds.Tables.Add(dtSalones);
        ds.Tables.Add(dtDetalle);

        ResourceType salon = new ResourceType();
        salon.KeyField = "salon";
        salon.Name = "salon";
        salon.ForeignKeyField = "salon";
        salon.TextField = "nombre";
        salon.DataSource = ds.Tables["salones"];
        RadScheduler1.ResourceTypes.Add(salon);
        
        RadScheduler1.DataSource = ds;
        RadScheduler1.DataMember = "detalle";
        RadScheduler1.DataKeyField = "salon";
        RadScheduler1.DataSubjectField = "asunto";
        RadScheduler1.DataStartField = "inicio";
        RadScheduler1.DataEndField = "fin";
        RadScheduler1.DataDescriptionField = "asunto";
    }

Thanks in advance.

1 Answer, 1 is accepted

Sort by
0
Veronica
Telerik team
answered on 13 Oct 2010, 09:32 AM
Hi Rolando,

By default resources appear as ComboBox in Advanced Form so you can be able to choose a resource for the appointment while inserting/editing. To be able to see the Resource Headers in Views you need to set the GroupBy property to the name of the resource.

Please take a look at this demo about Resource Grouping
This help topic may be helpful too.

Please feel free to ask me if you have further questions.

Best Regards,
Veronica MIlcheva
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
Scheduler
Asked by
Rolando
Top achievements
Rank 1
Answers by
Veronica
Telerik team
Share this question
or