2

I do some testing on jquery jqgrid but has problems :

jQuery("#navgrid").jqGrid(
        "navGrid",
        "#pagernav", 
        {}, //options 
        {}, // edit options 
        {}, // add options 
        {
            afterSubmit : function(response, postdata)
            {
                if(response.responseText == 'success')
                {
                    console.log(postdata);
                    alert('success and data should be changed')
                    console.log(postdata.id);
                    jQuery("#navgrid").delRowData(postdata.id);
                }
                else
                {
                    alert('failed and data should not be changed');
                }
                return true;
            },
            reloadAfterSubmit: true
        }, // del options 
        {} // search options 
);

I do two console.log on firebug for:

postdata => Object { oper="del", id="29"}
postdata.id => 29

Then I got error like this on my firebug:

postdata.split is not a function
toarr = postdata.split(","); 

I think I have followed this method : http://www.trirand.com/jqgridwiki/doku.php?id=wiki:methods

Bill the Lizard
  • 398,270
  • 210
  • 566
  • 880
kreamik
  • 609
  • 2
  • 11
  • 24

1 Answers1

1

Looks like triley was able to solve it here:

http://www.trirand.com/blog/?page_id=393/bugs/4-2-0-g-split-is-not-a-function-error/

I tried his fix and it works.

macca1
  • 9,541
  • 9
  • 32
  • 41