I am trying to create a context menu when a user clicks on a day of the WebMonthCalendar. I am not familiar with which objects to pass the javascript function. Here is what I have so far, it is partially working.
I know the ActivityDialogOpening function I can pass in oScheduleInfo, oEvent etc. What things can I pass to the WebMonthView Click event? Is there a place to see all of the possible events on your website for each control you have?
Here is what I have working so far:
<igsch:WebMonthView ID="cboLocations" runat='server' WebScheduleInfoID="WebScheduleInfo1" style="top: 0px; left: -1px; height: 563px; width: 87%" StyleSetName="Office2010Blue" EnableMultiResourceCaption="True" Height="500px" MultiDayEventFromArrowCaption="" MultiDayEventToArrowCaption="" StyleSetPath="" StyleSheetDirectory="" Width="500px"> <ClientEvents Click="WebScheduleInfo1_Click" /></igsch:WebMonthView>
----
<igsch:WebScheduleInfo ID="WebScheduleInfo1" runat="server"><ClientEvents ActivityDialogOpening="WebScheduleInfo1_ActivityDialogOpening" /></igsch:WebScheduleInfo>
<script type="text/javascript"> function WebScheduleInfo1_ActivityDialogOpening(oScheduleInfo, oEvent, oActivityEditProps, oActivity) { oEvent.cancel = true;
//console.log(oScheduleInfo); //console.log(oEvent); //console.log(oActivityEditProps);
var oTest = oActivity;
console.log(oTest.getStartDateTime()); //console.log(oTest.getStartDateTime()); //console.log(oTest.getSubject());
//OpenEvent("123", oActivity.getStartDateTime(), oActivity.getSubject()); OpenEvent("123", "123", "123"); }
function WebScheduleInfo1_Click(oScheduleInfo, oEvent, oActivityEditProps, oActivity) { // Need the objects I can pass in here console.log(oScheduleInfo); console.log(oEvent); console.log(oActivityEditProps); console.log(oActivity); }
function OpenEvent(dataKey, StartDate, Subject) { oWebDialogWindow1 = $find('WebDialogWindow1'); oWebDialogWindow1.set_windowState($IG.DialogWindowState.Normal); }</script>
Anyone out there have any ideas?
Hi OmegaPrime,
You can find the client-side events of WebMonthView and their parameters here - http://help.infragistics.com/NetAdvantage/ASPNET/2012.1/CLR4.0/?page=WebMonthView_Client_Side_Events_CSOM.html. And this is the CSOM reference guide for other controls - http://help.infragistics.com/NetAdvantage/ASPNET/2012.1/CLR4.0/?page=ASPNET_AJAX_CSOM.html.
Let me know if this helps.