2016-06-20 46 views
2

當Move事件被觸發時,我想獲得DataResourceField的值。下面是我的DayPilot代碼。獲取DayPilot Scheduler的DataResourceField值

<DayPilot:DayPilotScheduler ID="dplRoom" runat="server" HeaderFontSize="8pt" 
             HeaderHeight="20" 
             DataStartField="BookStartDate" 
             DataEndField="BookEndDate" 
             DataTextField="AppName" 
             DataValueField="BID" 
             DataResourceField="BedID" 
             EventHeight="30" 
             RowMinHeight="30" 
             EventFontSize="11px" 
             CellDuration="1440" 
             BackColor="White" 
             CssClass="grid" 
             DurationBarVisible="false" 
             EventClickHandling="select" 
             EventClickJavaScript="" 
             FreeTimeClickJavaScript="" 
             HeightSpec="Max" 
             Height="570" 
             CellGroupBy="Month" 
             OnTimeRangeSelected="dplRoom_TimeRangeSelected" 
             TimeRangeSelectedHandling="JavaScript" 
             TimeRangeSelectedJavaScript="timeRangeSelected(start, end, resource)" 
             ShowToolTip="false" 
             EventMoveHandling = "CallBack" 
             OnEventMove="dplRoom_EventMove" > 

OnEventMove:

Protected Sub dplRoom_EventMove(ByVal sender As Object, ByVal e As EventMoveEventArgs) 
    Response.Write(e.NewEnd + " " + e.NewStart + " " + e.Value + " " + e.Text) 
    End Sub 

我怎樣才能在EventMove事件DataResourceField值。

任何幫助將不勝感激。

回答

1

DataResourceField實際獲取或設置包含主鍵的列的名稱。

嘗試e.NewResource得到DataResourceField值。

1

ckeck this link它可能會幫助你。