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.