jQWidgets Forums

jQuery UI Widgets Forums TreeGrid load-on-demand + inline editing

This topic contains 3 replies, has 2 voices, and was last updated by  Peter Stoev 10 years, 10 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
  • load-on-demand + inline editing #57776

    agm_gosth
    Participant

    Hello,

    I have combined the load on demand example with the inline editing example in a jsfiddle here

    I am experiencing some problems and a little help will be much appreciated.

    1. When I add, update, delete I can’t reach addRow, updateRow, deleteRow functions from the source object.(no alert is shown). How do I sincronize with the server in this case ?
    2. when I add an item to an unexpended item I receive a console error. (Error: jqxDataTable: undefined)

    Looking fowrard to hear from you guys !

    Thank you,
    Gabrielle

    load-on-demand + inline editing #57779

    Peter Stoev
    Keymaster

    Hi Gabrielle,

    You can’t reach them because you don’t use that source object in the data binding. You’re loading the data on demand with the dataAdapters defined in the virtualModeCreateRecords function. It is also not necessary to use these funtions. You know in your code when you add, remove or update a row so you can add your Server Ajax calls when you call addRow, updateRow or deleteRow methods.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com

    load-on-demand + inline editing #57780

    agm_gosth
    Participant

    Thanks for the answer Peter but still I don’t understand how I am not using that source object in the data binding.
    Please correct me if i’m wrong but the data adapter defined in the virtualModeCreateRecords function it’s instantiated with the same source object.

    var dataAdapter = new $.jqx.dataAdapter(source,…

    would you be so kind to provide me with a code snippet so I can reach to thows functions and still be able to use load on demand with virtualModeCreateRecords ?

    Many thanks,

    Gabrielle

    load-on-demand + inline editing #57782

    Peter Stoev
    Keymaster

    Hi Gabrielle,

    The TreeGrid has no associated dataAdapter. Its data is loaded on demand which means that there’s no reason the treeGrid to call addRow, updateRow or deleteRow callback functions of a source object about which the widget does not know. If you want the treeGrid to use that source object, set its “source” property to point to the dataAdapter. The other approach which you can use as I suggested you is to make Ajax calls when you add, delete or remove rows.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com

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

You must be logged in to reply to this topic.