Using SortableRows and know when rows have been moved
jqgrid
Solution
jqGrid uses the ui-sortable plugin to sort rows: http://jqueryui.com/demos/sortable/. In
jQuery("#grid").sortableRows( options )
"options" is the passed to the sortable plugin.
options = { update : function(e,ui){} }
is what you want.
Problem
I want to take advantage of the sortableRows property of the jqGrid. How do I detect when a row has been moved. I have studied the documentation and looked for examples but haven't found much. I do believe it is something like ``` jQuery("#grid").sortableRows({connectWith:'#gird', ondrop: function(){ alert("row moved") }}); ``` but that does not work. I can move the rows, but don't seemed to have trapped the event. Is there something wrong with my syntax or my approach in general. Basically, I need to know that the rows have been rearranged so I can be sure they get saved with their new order. Thanks