jQWidgets Forums

jQuery UI Widgets Forums Grid jqxgrid addrow problem

This topic contains 0 replies, has 1 voice, and was last updated by  okasha 12 years, 5 months ago.

Viewing 1 post (of 1 total)
  • Author
  • jqxgrid addrow problem #15431

    okasha
    Participant

    Hello

    i am using these two function to add row to the grid first i submit the form and insert data to database then i return the inserted values as json after that i am trying to insert row to the grid but it is not working

    $(“#add_photo”).live(“click”,function(){
    var check = $(‘#gallery_photo’).jqxValidator(‘validate’);
    $(“#gallery_photo”).submit(function(e){

    if (check == true) {
    $(“#gallery_photo”).ajaxSubmit({

    success: afterSuccess,
    dataType: “json”
    });
    }
    e.preventDefault();

    return false;

    }) ;

    });

    function afterSuccess(responseText, statusText, xhr, $form) {

    var row={};
    var photo_code=responseText.photo_code;
    row[“section_title_ar”]=responseText.section_code;
    row[“photo_desc_ar”] = responseText.photo_desc_ar;
    row[“photo_desc_en”]=responseText.photo_desc_en;
    row[“photo_file”]=responseText.photo_file;
    $(“#jqxgrid”).jqxGrid(‘addrow’, photo_code,row);
    }

    thank you
    okasha

Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.