0

I'm using a daypilot scheduler for a booking hotel's rooms. I want to use events multiselection but when I enable this feature the scheduler is considering it as an event moving and not a selection

I did as following

 AllowMultiSelect="true"
 OnEventSelect="MonthScheduler_EventSelect"

EDIT:

  <div id="colright" style="margin-left:20px;">
            <div class="row">
                <DayPilot:DayPilotScheduler ID="MonthScheduler"
                    OnEventMenuClick="Scheduler_EventMenuClick"
                    runat="server"
                    RowHeaderWidthAutoFit="true"
                    DataStartField="Start"
                    DataEndField="End"
                    DataTextField="Name"
                    DataValueField="Id"
                    DataResourceField="ressource"
                    HeaderFontSize="9pt"
                    EventHeight="25"
                    EventFontSize="11px"
                    RowHeaderWidth="200"
                    Width="1050"
                    Height="500"
                    HeightSpec="Fixed"
                    ShowToolTip="false"
                    CellDuration="1440"
                    CellGroupBy="Week"
                    TreeEnabled="true"
                    TreeIndent="15"
                    ClientObjectName="dps1"
                    UseEventBoxes="Always"
                    EnableViewState="true"
                    ScrollLabelsVisible="false"
                    BubbleID="DayPilotBubble1"
                    ResourceBubbleID="DayPilotBubble1"
                    DataTagFields="Description"
                    TimeRangeSelectedHandling="PostBack"
                    OnTimeRangeMenuClick="DayPilotScheduler1_TimeRangeMenuClick"
                    OnEventResize="MonthScheduler_EventResize"
                    OnTimeRangeDoubleClick="MonthScheduler_TimeRangeDoubleClick"
                    OnTimeRangeSelected="MonthScheduler_TimeRangeSelected"
                    DragOutAllowed="false"
                    EventResizeHandling="PostBack"
                    EventMoveHandling="PostBack" 
                    OnEventMove="MonthScheduler_EventMove" 
                    xCellBubbleID="DayPilotBubble1"
                    OnBeforeEventRender="MonthScheduler_BeforeEventRender"
                    OnBeforeResHeaderRender="MonthScheduler_BeforeResHeaderRender"
                    OnBeforeTimeHeaderRender="MonthScheduler_EventMove_BeforeTimeHeaderRender"
                    EventMovingStartEndEnabled="true"
                    EventResizingStartEndEnabled="true"
                    OnScroll="MonthScheduler_Scroll"
                    Theme="scheduler_traditional"
                    BorderColor="#666666"

                    OnResourceCollapse="MonthScheduler_ResourceCollapse"
                    TimeRangeSelectingStartEndFormat=""
                    AllowMultiSelect="true"
                    OnEventSelect="MonthScheduler_EventSelect"
               EventClickHandling="Select"
                    ContextMenuSelectionID="DayPilotMenuSelection"
                    TreePreventParentUsage="true"
                    HourNameBackColor="#F0F0F0">
                </DayPilot:DayPilotScheduler>
            </div>
            <DayPilot:DayPilotBubble ID="DayPilotBubble1" runat="server" ClientObjectName="bubble"
                Width="0" OnRenderEventBubble="MonthScheduler_RenderEventBubble"  OnRenderContent="MonthScheduler_RenderContent" 
                Corners="Rounded" Position="Mouse" Animated="false" >
            </DayPilot:DayPilotBubble>
            <DayPilot:DayPilotMenu ID="DayPilotMenu1" CssClassPrefix="menu_default" 
                runat="server" ClientObjectName="DayPilotMenu1" MenuTitle="Action" ShowMenuTitle="true">
                <DayPilot:MenuItem Action="PostBack" Command="Modifier" Text="Edit" />
                <DayPilot:MenuItem Action="PostBack" Command="Delete" Text="Delete" />

            </DayPilot:DayPilotMenu>
            <DayPilot:DayPilotMenu ID="DayPilotMenuSelection" runat="server" ZIndex="10003" MenuTitle="Action" CssClassPrefix="menu_default" >
             <DayPilot:MenuItem Action="PostBack" Command="New" Text="Add new" />
             <DayPilot:MenuItem Action="PostBack" Command="Old" Text="Add old" />
             </DayPilot:DayPilotMenu>
        </div>

and this my event select (which is not fired on selection)

protected void MonthScheduler_EventSelect(object sender, DayPilotEventArgs e)
       {
//do         }
DEv0404
  • 31
  • 5

1 Answers1

0

You need to map one of the user actions to the "Select" behavior.

There are two basic options:

  1. Click

    EventClickHandling="Select"
    
  2. Double click

    EventDoubleClickHandling="Select"
    

See also event selecting topic in the docs. This will of course prevent you from using this action for another behavior (like opening the edit dialog). If you want to open the edit dialog you can also add a special "edit" icon (using active areas).

The upcoming version (8.0) will also support "rectangle event selecting" that will let you select multiple events using Shift + drag, just like in desktop file manager applications. See a preview here:

http://javascript.daypilot.org/sandbox/scheduler/eventmultiselecting.html

Dan
  • 2,157
  • 21
  • 15
  • Please see EDIT as I 've made as mentionned in the documentation but still selection is considered as event moving – DEv0404 Apr 16 '15 at 09:33
  • Can you see the problem in this demo? http://www.daypilot.org/demo/Scheduler/EventSelecting.aspx – Dan Apr 16 '15 at 10:26
  • No I don't see the problem in this demo – DEv0404 Apr 16 '15 at 10:28
  • You can try to 1) copy the settings from that demo page; and/or 2) put the scheduler in an empty page to eliminate influence of any other JS code – Dan Apr 16 '15 at 10:37