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. Image for the cookie policy date
close icon

Refresh schedule

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

5 Replies

SK Sarath Kumar P K Syncfusion Team September 23, 2015 10:18 AM UTC

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



FA Fanisa September 23, 2015 11:50 AM UTC

The 1st answer I get this error when implimenting:

"chObj.refreshAppointments is not a function"


SK Sarath Kumar P K Syncfusion Team September 24, 2015 07:37 AM UTC

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


FA Fanisa September 30, 2015 12:26 PM UTC

Are you refering to the version of a specific dll?


SK Sarath Kumar P K Syncfusion Team October 1, 2015 09:06 AM UTC

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

Loader.
Live Chat Icon For mobile
Up arrow icon