Thread ID: |
Created: |
Updated: |
Platform: |
Replies: |
120775 | Oct 14,2015 07:39 AM UTC | Oct 20,2015 04:17 AM UTC | ASP.NET MVC | 8 |
![]() |
Tags: Schedule |
@(Html.EJ().Schedule("Schedule1")
.Width("100%")
.Height("525px")
.ScheduleClientSideEvents(eve => eve.CellClick("OnCellClick").AppointmentClick("OnCellClick")) //If you want to open the appointment detail on single click bind the same method name for appointment click and use the below code example
.AppointmentSettings(
fields => fields.Datasource(Model)
----------------
)
<script type="text/javascript">
function OnCellClick(args) {
args.cancel = true; //Block the quick window open.
if (args.type == "cellClick")
this._appointmentWindow({ target: args.target.currentTarget }); //Open the detailed window with updated date and time.
else if(args.type=="appointmentClick")
this._appointmentWindow({ target: $("#Appointment_"+args.appointment.Id) }); //If you want to open the appointment detailed window use this code.
}
</script>
</code>
Regards,
Sarath Kumar P K
<button onclick='openWindow()'>Open detailed window</button> //Create button to trigger the openWindow method
<script type="text/javascript">
function openWindow() {
var schedule = $("#Schedule1").data("ejSchedule");
schedule._cellSelection({ target: $(schedule.element.find(".e-workcells")[0]) }); //Call the _cellSelection method to get the required data based on target cell
schedule._appointmentWindow({ target: $(schedule.element.find(".e-workcells")[0]) }); //Here you need to pass the schedule cell target element, I have passed the first schedule work cells. If you want to open the window in month view replace the class “.e-workcells” by “.e-monthcells”.
}
</script>
</code>
Regards,
Sarath Kumar P K
This post will be permanently deleted. Are you sure you want to continue?
Sorry, An error occured while processing your request. Please try again later.
or the page will be automatically redirected to sign-in page in 10 seconds.