Select multiple timeslot

3 posts, 0 answers
  1. Lakpa
    Lakpa avatar
    13 posts
    Member since:
    Dec 2013

    Posted 17 Feb 2014 Link to this post

    Hi,
        I am kinda stuck with multiple timeslot selection, like that of outlook. Although it highlights all the selected timeslot but then I am not able to find out the date selected.

    Since I am using my own UserControl I disabled Insert/Edit/Delete of Radscheduler, so FormCreated wont' be fired.
    I am using RadAjaxManager for server side event. In my Client event  
    OnClientTimeSlotContextMenuItemClicked="OnClientTimeSlotContextMenuItemClicked"

     
    function OnClientTimeSlotContextMenuItemClicked(sender, eventArgs) {<br><br>                var menuItem = eventArgs.get_item();<br>                var timeSlot = eventArgs.get_slot();<br>                if (menuItem != null) {<br>                    var selectedMenuItem = menuItem._properties._data.value;<br>                    if (selectedMenuItem == "createTimesheet") {<br><br><br>                    } else if (selectedMenuItem == "createTodo") {<br><br>                    } else if (selectedMenuItem == "AllDay") {<br>                        var radWindow = $find("<%=rWindowAppointmentInsert.ClientID %>");<br>                        radWindow.show();<br>                        var startDate = new Date(timeSlot._startTime);<br>                        var duration = timeSlot.get_durationInMinutes();<br>                        var arg = "Type=AllDay,Start=" + timeSlot._startTime.toDateString() + " " + startDate.getHours() + ":" + startDate.getMinutes();<br>                        arg += ",Duration=" + duration;<br>                        $find("<%=rAjaxMgrScheduler.ClientID %>").ajaxRequest(arg);<br>                        return false;<br>                    } else if (selectedMenuItem == "Insert") {<br>                        var radWindow = $find("<%=rWindowAppointmentInsert.ClientID %>");<br>                        radWindow.show();<br>                        var startDate = new Date(timeSlot._startTime);<br>                        var duration = timeSlot.get_durationInMinutes();<br>                        var arg = "Type=Insert,Start=" + timeSlot._startTime.toDateString() + " " + startDate.getHours() + ":" + startDate.getMinutes();<br>                        arg += ",Duration=" + duration;<br>                        $find("<%=rAjaxMgrScheduler.ClientID %>").ajaxRequest(arg);<br>                        return false;<br>                    } else { <br>                    <br>                    }<br>                }<br>                return false;<br>            }
    I cannot find how to get start and end date.

    Thank you



  2. Lakpa
    Lakpa avatar
    13 posts
    Member since:
    Dec 2013

    Posted 17 Feb 2014 in reply to Lakpa Link to this post

     function OnClientTimeSlotContextMenuItemClicked(sender, eventArgs) {

                    var menuItem = eventArgs.get_item();
                    var timeSlot = eventArgs.get_slot();
                    if (menuItem != null) {
                        var selectedMenuItem = menuItem._properties._data.value;
                        if (selectedMenuItem == "createTimesheet") {


                        } else if (selectedMenuItem == "createTodo") {

                        } else if (selectedMenuItem == "AllDay") {
                            var radWindow = $find("<%=rWindowAppointmentInsert.ClientID %>");
                            radWindow.show();
                            var startDate = new Date(timeSlot._startTime);
                            var duration = timeSlot.get_durationInMinutes();
                            var arg = "Type=AllDay,Start=" + timeSlot._startTime.toDateString() + " " + startDate.getHours() + ":" + startDate.getMinutes();
                            arg += ",Duration=" + duration;
                            $find("<%=rAjaxMgrScheduler.ClientID %>").ajaxRequest(arg);
                            return false;
                        } else if (selectedMenuItem == "Insert") {
                            var radWindow = $find("<%=rWindowAppointmentInsert.ClientID %>");
                            radWindow.show();
                            var startDate = new Date(timeSlot._startTime);
                            var duration = timeSlot.get_durationInMinutes();
                             var arg = "Type=Insert,Start=" + timeSlot._startTime.toDateString() + " " + startDate.getHours() + ":" + startDate.getMinutes();
                            arg += ",Duration=" + duration;
                            $find("<%=rAjaxMgrScheduler.ClientID %>").ajaxRequest(arg);
                            return false;
                        } else { 
                        
                        }
                    }
                    return false;
                }
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Lakpa
    Lakpa avatar
    13 posts
    Member since:
    Dec 2013

    Posted 17 Feb 2014 Link to this post

    Found out the solution.:

    sender.get_selectedSlots()

    gives me all selected slots.
Back to Top