Posted on Saturday, December 3, 2011 Drag & Drop tabular form rows Category APEX and jQuery Here is how drag & Drop tabular form rows to order records how you like.This solution works for tabular forms where you do not use pagination on APEX 4.1. Your table need have column that store display sequence id. If your table do not have column that can be used for this, alter your table and add column.ALTER TABLE your_table ADD (display_seq NUMBER);Go into the report attributes of your tabular form. On the right hand side of the page you will see Tasks. In there click Add Derived Column. Edit derived column attributes and change Display As to Standard Report Column. Add to Column Formatting HTML Expression:Add to Column Formatting HTML Expression:<img class="sort-row" src="#IMAGE_PREFIX#ws/sort.gif" alt="" />Next uncheck all Sort checkboxes from report attributes and add order by to your report query:ORDER BY display_seqCreate dynamic Action. Select AdvancedName: Set Form OrderingEvent: After RefreshSelection Type: RegionRegion: {select your report region}Condition: No ConditionAction: Execute JavaScript codeFire On Page Load: TrueCode:$(this.triggeringElement).find(".report-standard").sortable({ cursor: "move", handle: "img.sort-row", items: "tr:not(:first)", containment: ".report-standard", axis: "y", opacity: 0.9, revert: true, helper: function(e,u){ u.children().each(function(){ $(this).width($(this).width()); }); return u; } }).find("img.sort-row").css({"cursor":"move"}).disableSelection(); Selection Type: NoneCreate PL/SQL process On Submit - After Computations and Validations:FOR i IN 1 .. APEX_APPLICATION.G_FROWID.COUNT LOOP UPDATE emp SET display_seq = i WHERE rowid = APEX_APPLICATION.G_FROWID(i); END LOOP;Add to page HTML Header:<script type="text/javascript" src="#IMAGE_PREFIX#libraries/jquery-ui/1.8.14/ui/minified/jquery.ui.sortable.min.js"></script>NOTE ! If you are on APEX 5:Instead of adding jQuery UI library to HTML header, place below to page JavaScript file URLs#JQUERYUI_DIRECTORY#ui/#MIN_DIRECTORY#jquery.ui.sortable#MIN#.jsSee working example.