hi,
Im trying to open an appointment with a customised menu. I looked in the help file but I can't seem to find how to do this. I basicly used the example of the website ( PreparePopupMenu ). ATM this is what i got:
protected void DocentRooster_PreparePopupMenu(object sender, PreparePopupMenuEventArgs e)
{
ASPxSchedulerPopupMenu menu = e.Menu;
DevExpress.Web.ASPxMenu.MenuItemCollection menuItems = menu.Items;
if (menu.Id.Equals(SchedulerMenuItemId.DefaultMenu))
{
}
else if (menu.Id.Equals(SchedulerMenuItemId.AppointmentMenu))
{
menu.ClientSideEvents.ItemClick = String.Format("function(s, e) {{ DefaultAppointmentMenuHandler({0}, s, e); }}", DocentRooster.ClientID);
menu.Items.Clear();
DevExpress.Web.ASPxMenu.MenuItem registreerItem = new DevExpress.Web.ASPxMenu.MenuItem("Registreer presentie", "RegistreerPresentieID");
registreerItem.NavigateUrl = "~/Forms/Presentieregistratie.aspx";
registreerItem.BeginGroup = true;
menuItems.Add(registreerItem);
DevExpress.Web.ASPxMenu.MenuItem openItem = new DevExpress.Web.ASPxMenu.MenuItem("Open", "OpenID");
openItem.BeginGroup = true;
menuItems.Add(openItem);
DevExpress.Web.ASPxMenu.MenuItem deleteItem = new DevExpress.Web.ASPxMenu.MenuItem("Verwijder", "DeleteId");
menuItems.Add(deleteItem);
}
}
So I have an openItem, with an "OpenID" assigned to it. When I click on it I will break in the ExecuteCore() like this:
protected override void ExecuteCore()
{
Appointment apt = Control.SelectedAppointments[0];
if (MenuItemId == "DeleteId")
{
apt.Delete();
}
else if (MenuItemId == "RegistreerPresentieID")
{
System.Web.UI.Page pPage = this.Control.Parent.Page;
zetAppointment(apt, ref pPage);
}
else if (MenuItemId == "OpenID")
{
System.Web.UI.Page pPage = this.Control.Parent.Page;
}
}
My problem starts here, how do I invoke the appointment form?
Could you give me a hint?
With kind regards,
Dario Leanza
Van Ooijen Consultancy