jQWidgets Forums

jQuery UI Widgets Forums Scheduler Refresh data

This topic contains 9 replies, has 2 voices, and was last updated by  Martin 6 years, 8 months ago.

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Refresh data Posts
  • Refresh data #101635

    CXXXV
    Participant

    Using json. What is the method to fetch/refresh appopintments. Equivalent to grid.updatebounddata.

    Refresh data #101657

    Martin
    Participant

    Hello CXXXV,

    There is not a particular method for refreshing the appointments ad the updatebounddata for the grid.
    You can achieve this by updating the data adapter and passing it again to the scheduler.
    Please, take a look at this Example.

    Best Regards,
    Martin

    jQWidgets Team
    http://www.jqwidgets.com/

    Refresh data #101711

    CXXXV
    Participant

    Makes it difficult when storing appointments in a database. So how does one go about showing newly created appointments that have been saved to a server? All other scheduler widgets offer this ability. Seem a feature you guys need to add. Just like your other data aware widgets.

    Refresh data #101714

    Martin
    Participant

    Hello CXXXV,

    You can still use:

    adapter = new $.jqx.dataAdapter(source);
     $("#scheduler").jqxScheduler('source', adapter);

    for refreshing the scheduler’s appointments when you need, as you would have used use “updatebounddata” in the grid.

    Best Regards,
    Martin

    jQWidgets Team
    http://www.jqwidgets.com/

    Refresh data #101723

    CXXXV
    Participant

    Tried that. New items do not show up in the scheduler. How does thia trigger a new fetch in the source. Without that no new items will show.

    Refresh data #101729

    Martin
    Participant

    Hello CXXXV,

    Yes, you will first need to update the source yourself and then pass it to the dataAdapter, as shown above.

    Best Regards,
    Martin

    jQWidgets Team
    http://www.jqwidgets.com/

    Refresh data #101815

    CXXXV
    Participant

    Martin:

    I can make the source get new data. However, I am not able to make the SCHEDULER display refresh. I followed example.

    Refresh data #101839

    Martin
    Participant

    Hello CXXV,

    Can you send us your code, so I can take a look?
    Thank you!

    Best Regards,
    Martin

    jQWidgets Team
    http://www.jqwidgets.com/

    Refresh data #101871

    CXXXV
    Participant
    		GetMenuData();
    		source.localdata = menuData;
    		NewAdapter = new $.jqx.dataAdapter(source);
    		$("#scheduler").jqxScheduler('source', NewAdapter);

    GetMenuData is an ajax call to geet updated data.

    Refresh data #101896

    Martin
    Participant

    Hello CXXXV,

    Most probably you update the source before the menuData is retrieved by the ajax call, asynchronously.

    Try moving the following:

    source.localdata = menuData;
     NewAdapter = new $.jqx.dataAdapter(source);
     $("#scheduler").jqxScheduler('source', NewAdapter);

    inside the success callback of the call.

    Best Regards,
    Martin

    jQWidgets Team
    http://www.jqwidgets.com/

Viewing 10 posts - 1 through 10 (of 10 total)

You must be logged in to reply to this topic.