Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
25
Add Click Event
posted

Hi !

I would like to add the click event on the Appointment.

If user click on activity , I want to do the some check for user purpose. How can I do ?

Parents
No Data
Reply
  • 105
    posted

    Hi,

    I wrte this script to realize an action after a click in a appointment:

    In the client-side:

    <script type="text/javascript">

    function OpenAppointmentDetail(oScheduleInfo, oEvent, oDialog, oActivity) {
                document.getElementById("HideIdAgenda").value = "";
                var eventID = oActivity.getDataKey();

                oEvent.cancel = true;
                //alert('EventId= ' + eventID + ' startDateTime= ' + startDate + ' Durée= ' + duration);
                document.getElementById("HideIdAgenda").value = eventID.toString();
                document.getElementById("lblIdEvent").text = eventID.toString();
                __doPostBack('btnChercher', '');

            }

    </script>

    <igsch:WebScheduleInfo ID="WebScheduleInfo1" runat="server" EnableMultiResourceView="True"
                        FirstDayOfWeek="Sunday" OnActivityAdding="WebScheduleInfo1_ActivityAdding" OnVarianceAdding="WebScheduleInfo1_VarianceAdding"
                        StyleSetName="Appletini" TimeDisplayFormat="Time24Hour" WorkDayEndTime="20:00" >
                        <ClientEvents ActivityDialogOpening="OpenAppointmentDetail" />
                    </igsch:WebScheduleInfo>

     

    I put an hidden button like that:

    <asp:Button ID="btnChercher" runat="server" OnClick="btnChercher_Click" Text="Chercher"
                                    ClientIDMode="Static" Visible="True" Style="visibility: hidden;" />

     

    finally in the code behind:

    protected void btnChercher_Click(object sender, EventArgs e)
            {

    //TODO

    }

    With this code i'm able to catch the appointment clicked to show or modify it in my own appointment form.

    I hope tha this code may help you.

    Best regards.

    Pascal

Children
No Data