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

[Solved] Problem With RadScheduler

2 Answers 123 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
pradeep madugula
Top achievements
Rank 1
pradeep madugula asked on 19 Oct 2009, 11:01 AM
Hi,

 I am facing a problem with Scheduler, i created a contest menu on right clicking on Scheduler. every thing is working fine in IE but in Firefox it's not working .The contest menu is not working in Mozilla Firefox
plz help me in this matter..............

2 Answers, 1 is accepted

Sort by
0
Peter
Telerik team
answered on 19 Oct 2009, 11:44 AM
Hello pradeep,

With Q3 2009 there will be built in context menus for time slots and appointments. Meanwhile you can refer to this demo which works fine in both IE and Firefox:
http://demos.telerik.com/aspnet-ajax/scheduler/examples/contextmenu/defaultcs.aspx


Kind regards,
Peter
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
pradeep madugula
Top achievements
Rank 1
answered on 19 Oct 2009, 12:09 PM
Hi Peter ,

this is the code written in server side

protected void radContextMenu_ItemClick(object sender, Telerik.Web.UI.RadMenuEventArgs e) 
        { 
            Telerik.Web.UI.RadMenuItem ItemClicked = e.Item; 
            DateTime pDate = Convert.ToDateTime(Convert.ToDateTime(hdContextMenuDate.Value).ToShortDateString()); 
            DateTime pPasteDate = new DateTime(); 
            SmartDate pSmartDate = new SmartDate(); 
            int Count = 0
            if (hdWebcalid.Value == "") 
                hdWebcalid.Value = vsWebCalID.ToString(); 
            if (ItemClicked.Text == "Show") 
            { 
                if (hdWebcalid.Value != "") 
                    Cal.UpdateCalByOrderStatus(Convert.ToInt32(hdWebcalid.Value), 1, pDate); 
            } 
            else if (ItemClicked.Text == "Order") 
            { 
                if (hdWebcalid.Value != "") 
                    Cal.UpdateCalByOrderStatus(Convert.ToInt32(hdWebcalid.Value), 2, pDate); 
            } 
            else if (ItemClicked.Text == "Copy") 
            { 
                hdCopyDate.Value = pDate.ToString(); 
                //radContextMenu.Items.FindItemByText("Paste").Enabled = true
                hdPasteStatus.Value = "1"
            } 
            else if (ItemClicked.Text == "Paste") 
            { 
                pPasteDate = pDate
                pSmartDate = new SmartDate(pPasteDate); 
 
                DateTime pCutoffDate; 
 
                if (Convert.ToInt32(ddlCutoffdt.SelectedValue) != 0) 
                    pCutoffDate = pDate.AddDays(-Convert.ToInt32(ddlCutoffdt.SelectedValue)); 
                else 
                    pCutoffDate = pDate
 
                if (pPasteDate > System.DateTime.Today) 
                { 
                    //To check whether copy & paste are clicked on same date 
                    if (Convert.ToDateTime(hdCopyDate.Value) != pDate) 
                    { 
                        DataSet Copyds = Cal.GetCalByWebcalIDandDate(Convert.ToInt32(hdWebcalid.Value), Convert.ToDateTime(hdCopyDate.Value)); 
 
                        //To check whether the paste cell is having any appointments & to avoid pasting duplicate records. 
                        DataSet Pasteds = Cal.GetCalByWebcalIDandDate(Convert.ToInt32(hdWebcalid.Value), pPasteDate); 
 
                        if (Pasteds.Tables[0].Rows.Count > 0) 
                        { 
                            for (int i = 0; i < Copyds.Tables[0].Rows.Count; i++) 
                            { 
                                Count = Cal.GetWebLunchMenuCount(Convert.ToInt32(Copyds.Tables[0].Rows[i]["menus_id"].ToString()), Convert.ToInt32(hdWebcalid.Value), pPasteDate); 
 
                                
                                //If record is not present with this menu id in the paste date 
                                if (Count == 0) 
                                    Cal.AddWebLunchSchedule(pSmartDate, Convert.ToInt32(Copyds.Tables[0].Rows[i]["meal"].ToString()), Convert.ToInt32(Copyds.Tables[0].Rows[i]["menus_id"].ToString()), 1, false, Convert.ToInt32(hdWebcalid.Value), false, 0, pCutoffDate); 
                            } 
                        } 
                        else 
                        { 
                            for (int i = 0; i < Copyds.Tables[0].Rows.Count; i++) 
                            { 
 
                                Cal.AddWebLunchSchedule(pSmartDate, Convert.ToInt32(Copyds.Tables[0].Rows[i]["meal"].ToString()), Convert.ToInt32(Copyds.Tables[0].Rows[i]["menus_id"].ToString()), 1, false, Convert.ToInt32(hdWebcalid.Value), false, 0, pCutoffDate); 
                            } 
                        } 
                    } 
                } 
                else 
                { 
                    //ClientScript.RegisterStartupScript(typeof(String), "ReportMessage", "<script lanaguage='javascript'>alert('You Cannot Copy To This Date,Please Schedule For Future Date');</script>"); 
                    ScriptManager.RegisterStartupScript(this, this.GetType(), "", "alert('You Cannot Copy To This Date,Please Schedule For Future Date.');", true); 
                } 
 
            } // end of paste  
 
            else if (ItemClicked.Text == "View") 
            { 
                //ItemClicked.Attributes.Add("onclick", "javascript:{ popupItems('" + pDate + "'); }"); 
                //--------------------- 
                //ScriptManager.RegisterStartupScript(this, this.GetType(), "Items List", "popupItems('" + pDate + "');", true); 
                //--------------------------- 
                // ClientScript.RegisterStartupScript(typeof(String), "Items List", "javascript:{ popupItems('" + pDate + "'); }"); 
                //lbAddAnnouncement.Attributes.Add("onclick", " return AnnouncementLoadingValues();"); 
                // ItemClicked.Attributes.Add("onclick", "javascript:{return AnnouncementLoadingValues(); }"); 
 
                //ScriptManager.RegisterStartupScript(this, this.GetType(), "Items List", "AnnouncementLoadingValues();", true); 
 
                DataSet itemsds = Cal.GetCalByDate(pDate, hdWebcalid.Value.ToString()); 
 
                if (itemsds.Tables[0].Rows.Count > 0) 
                { 
                     
                    dlScheduledItems.DataSource = itemsds
                    dlScheduledItems.DataBind(); 
                    ModalPopupEdit.Show(); 
                } 
 
                
                 
            } 
            else if (ItemClicked.Text == "ClearAll") 
            { 
                FSSAdmin.MenuLogic.Cal.DelWebLunchMenuItemsInCal(Convert.ToInt32(hdWebcalid.Value), 0, pDate); 
 
            } 
 
            Collection<Cal> WeblunchmenuDates = Cal.GetWebLunchScheduleByWebcalID(Convert.ToInt32(hdWebcalid.Value)); 
            RadScheduler1.DataSource = WeblunchmenuDates
            //RadScheduler1.DataBind(); 
            RadScheduler1.Rebind(); 
             
        } 

 You plz check the code this is in clentside
function appointmentContextMenu(sender, eventArgs) 
                { 
                    var menu = $find("<%= radContextMenu.ClientID %>"); 
                    selectedAppointment = eventArgs.get_appointment(); 
                    //checkResourceMenuItem(menu, selectedAppointment); 
                    menu.show(eventArgs.get_domEvent()); 
                } 

Tags
Scheduler
Asked by
pradeep madugula
Top achievements
Rank 1
Answers by
Peter
Telerik team
pradeep madugula
Top achievements
Rank 1
Share this question
or