views:

105

answers:

1

Using: http://stackoverflow.com/questions/2382879/using-sortablerows-and-know-when-rows-have-been-moved I have been able to call an alert after the modification of my row order.

How would I send this data to PHP/ call the editurl passing this data, similar to when adding or editing rows the editurl receives a $_POST['oper'] variable?

Currently have:

jQuery("#images_list").jqGrid('sortableRows',
                              options = { update : function(e,ui){alert("hi");} }); 
+2  A: 

First of all the usage of update event should be like following:

jQuery("#images_list").jqGrid(
    'sortableRows',
    { update : function(e,ui) {
                   alert("item with id=" + ui.item[0].id + " is droped");
               }
    });

If you need other row data, you can get there using the id of the row moved and getRowData method.

How to post the results to the server you should decide yourself. You can use $.ajax function directly. I think, that changing of order of rows should not be interpret as an adding, deleting or editing of rows.

Oleg