jQWidgets Forums

Forum Replies Created

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts

  • Maurizio0015
    Participant

    Hi Hristo,
    i thank you for your interest.
    I think the jqxDataAdapter is not necessary for my purpose.

    I can define two AJAX functions: one for data loading and one for their updateing, and remove the jqxDataAdapter whose true function is to interface more complex objects such as jqxGrid.

    I understood correctly?

    Best Regards,
    Maurizio.


    Maurizio0015
    Participant

    Hi Hristo,
    i do not want to check the input data, but proceed to storing them on my database.

    I solved by eliminating the ‘updaterow’ method from the source and entering the ajax call in the point of my interest, as shown here:

    
    $("#jqxUpdate").bind('click', function () {
                row["Id"] = 3055;
                row["Descrizione"] = $("#jqxDescrizione").val();
                
                row.Id = 3055;
                $.ajax({
                    dataType: 'json',
                    cache: false,
                    data: row,
                    url: updatedescription,
                    type: "POST",
                    success: function (data, status, xhr) {
                        commit(true);
                    },
                    error: function (jqXHR, textStatus, errorThrown) {
                        alert(jqXHR.statusText);
                        commit(false);
                    }
                });
    
            });
    
    

    I wanted to ask you if you want to extend the jqxDataAdapter object so that it can contain within itself the ability to recall the three classic CRUD methods that may contain the source (‘addrow’, ‘updaterow’, ‘deleterow’).

    In this way, any jqWidgets object may have a source not only in reading, but also in the modification and deletion, delegating to jqxDataAdapter the opportunity to call them.

    Could you give me more information about this?

    Best regards,
    Maurizio.

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