We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

Refresh schedule

Thread ID:

Created:

Updated:

Platform:

Replies:

120504 Sep 22,2015 01:35 AM Oct 1,2015 05:06 AM ASP.NET MVC 5
loading
Tags: Schedule
Fanisa
Asked On September 22, 2015 01:35 AM

1.How can a refresh the schedule in HTML5 or javascript without refreshing the whole page? After adding or removing an appointment that is.

2. Please give me an example of how the Query property works in the schedule.

Thanks

Sarath Kumar P K [Syncfusion]
Replied On September 23, 2015 06:18 AM

Hi Fanisa,

Thanks for contacting Syncfusion support.

Query 1: How can a refresh the schedule in HTML5 or javascript without refreshing the whole page? After adding or removing an appointment that is.
We have prepared a sample to refresh the schedule data without refreshing the whole page using refreshAppointments method. The sample can be downloaded from the following location.
http://www.syncfusion.com/downloads/support/forum/120504/ze/ScheduleCRUD-2102474893

In the above sample we have used a button to refresh the schedule data. Please refer to the following code example.
<code>
<button name="refresh" onclick="refreshSchedule()">Refresh</button>   //Button to trigger refresh appointment method

<script type="text/javascript">

    function refreshSchedule(args) {

        var schObj = $("#Schedule1").data("ejSchedule");         //Create schedule object to use refreshAppointments method

        schObj.refreshAppointments();

    }
</script>

//You can use the refreshAppointments method using schedule object at anywhere in script page
</code>

Query 2: Please give me an example of how the Query property works in the schedule.
We filter the schedule appointment data using the query property in schedule. In the above provided sample, we have filtered the appointments collection using the query field. Please refer to the following code example.

<code>

@(Html.EJ().Schedule("Schedule1")

     .Width("100%")

     .Height("525px")

     .AppointmentSettings(fields => fields.Datasource("http://mvc.syncfusion.com/OdataServices/Northwnd.svc/")

     .Query("ej.Query().from('Events').take(2)")      //Get the appointments collection from Events table only 2 records

     .Id("Id")

     .Subject("Subject")

     .Description("Description")

     .StartTime("StartTime")

     .EndTime("EndTime")

     .AllDay("AllDay")

     .Recurrence("Recurrence")

     .RecurrenceRule("RecurrenceRule"))
)
</code>

To know more about the query property, please refer the following links.
Schedule databinding : http://help.syncfusion.com/js/schedule/data-binding
Schedule Online Sample : http://mvc.syncfusion.com/demos/web/schedule/remotedatabinding
Default query property: http://help.syncfusion.com/aspnetmvc/datamanager/query

Regards,
Sarath Kumar P K


Fanisa
Replied On September 23, 2015 07:50 AM

The 1st answer I get this error when implimenting:

"chObj.refreshAppointments is not a function"

Sarath Kumar P K [Syncfusion]
Replied On September 24, 2015 03:37 AM

Hi Fanisa,

We have implemented this “refreshAppointments” method in our build version 13.2.0.34. If you are using the lower build version, this method will not work properly. Ensure your build version and also check that you have created the schedule object properly and then use the “refreshAppointments” method to refresh the schedule data.

<code>

var schObj = $("#Schedule1").data("ejSchedule");         //Create schedule object to use refreshAppointments method

schObj.refreshAppointments();

//You have mentioned the object “chObj.refreshAppointments”, check that chObj have schedule object to access refreshAppointments method.


</code>

Regards,
Sarath Kumar P K

Fanisa
Replied On September 30, 2015 08:26 AM

Are you refering to the version of a specific dll?

Sarath Kumar P K [Syncfusion]
Replied On October 1, 2015 05:06 AM

Hi Fanisa,

We are not referring to the DLL version as the “refreshAppointments” is a client side method and not related with DLL.

Please use ej.web.all.min.js file from the build version 13.2.0.34 (or higher version) in your application to use the refreshAppointments method. This method will not work properly with the lower versions that 13.2.0.34.

Regards,
Sarath Kumar P K

CONFIRMATION

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.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;