jQWidgets Forums

jQuery UI Widgets Forums Grid Export jqxgrid on $(this.form).serialize()

This topic contains 1 reply, has 2 voices, and was last updated by  Peter Stoev 11 years, 6 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • Export jqxgrid on $(this.form).serialize() #28566

    MickaGau
    Member

    Hello
    I have a form with input text and 2 jqxgrid.
    When user wlick on submit button, i would like to export the text areas from the form but also all rows from both jqxgrid.

    Below the mehtod i use to submit the form (i c atch the event with jquery) but currentely it exports only the text area.

    What would be the best way to add the jqxgrid data to the data exported by ajax method?

    Thank you

    $(".closeDialog").live("click", function (e) {
    //prevent default action on the button click
    e.preventDefault();
    $(this.form).validate();
    if ($(this.form).valid()) {
    //Start ajax call
    $.ajax({
    type: "POST",
    url: $(this.form).attr('action'),
    data: $(this.form).serialize(),
    success: function (data) {
    if (data.status == "success") {
    $(".dialogMGA").dialog("close");
    }
    else //show error message
    $(".validation-summary-errors_MGA").html("<ul><li>" + data.Error + "</li></ul>");
    },
    error: function (data) {
    //If it happens alert user of the error
    $(".validation-summary-errors_MGA").html(data.responseText);
    //close the modal dialog
    $(this).closest(".dialogMGA").dialog("close");
    }
    });
    }
    });
    Export jqxgrid on $(this.form).serialize() #28583

    Peter Stoev
    Keymaster

    Hi MickaGau,

    If you want to get the Grid’s rows, you may use the “getrows” method. It returns an Array of all rows displayed in the Grid widget.

    Best Regards,
    Peter Stoev

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

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

You must be logged in to reply to this topic.