Hi,
I am creating my own list of categories for the
RadScheduleView, it displays ok with this code:
myScheduleView.CategoriesSource = context.Category.ToList();
When I create and save a new appointment I am able to
save it with the category Id from the list above.
var appointment = e.Appointment as SqlAppointment;
if (appointment.Category.CategoryName != null)
{
appointment.CategoryId = context.Category
.Where(p => p.CategoryName == appointment.Category.CategoryName)
.Select(p => p.CategoryId).FirstOrDefault();
}
context.SqlAppointment.Add(appointment);
context.SaveChanges();
However when I re-run the app and load this
myScheduleView.CategoriesSource = context.Category.ToList();
myScheduleView.AppointmentsSource = context.SqlAppointment.ToList();
It load the categories it loads the appointments the
appointments have their keys to the categories, however the RadScheduleView is
not showing the category for each of the appointment, and I don’t know why? It should
it knows the Sources and the id’s.
Any idea what am I missing?
Thank you
I am creating my own list of categories for the
RadScheduleView, it displays ok with this code:
myScheduleView.CategoriesSource = context.Category.ToList();
When I create and save a new appointment I am able to
save it with the category Id from the list above.
var appointment = e.Appointment as SqlAppointment;
if (appointment.Category.CategoryName != null)
{
appointment.CategoryId = context.Category
.Where(p => p.CategoryName == appointment.Category.CategoryName)
.Select(p => p.CategoryId).FirstOrDefault();
}
context.SqlAppointment.Add(appointment);
context.SaveChanges();
However when I re-run the app and load this
myScheduleView.CategoriesSource = context.Category.ToList();
myScheduleView.AppointmentsSource = context.SqlAppointment.ToList();
It load the categories it loads the appointments the
appointments have their keys to the categories, however the RadScheduleView is
not showing the category for each of the appointment, and I don’t know why? It should
it knows the Sources and the id’s.
Any idea what am I missing?
Thank you