Here is the url: Read Article - Drag &amp; Drop tabular form rows
It works fine if one follow the hint from Baki (For apex 4.2 one have to adapt a css class).
Afterwards I tried the same with an Interactive Report. It nearly works.
I once again had to adapt a css class.
I used the
class instead of the
Everything went fine. Except the "Save the Thing to the DB" issiu did not work.
The following code do not work (the "APEX_APPLICATION.G_FROWID.COUNT" is allways 0):
FOR i IN 1 .. APEX_APPLICATION.G_FROWID.COUNT LOOP UPDATE emp SET sort_order = i WHERE rowid = APEX_APPLICATION.G_FROWID(i); END LOOP;
Does anybody know why?
Thanks for the idea. Think this will finally be the solution.
But if I add an APEX_ITEM.HIDDEN(n, Key) and make this column hidden in the report definition,
it seems to be not availlable. (again APEX_Application.g_f0n.COUNT is NULL).
The hidden item also do not appear in the html source code.
thanks for help,
Here is example query:
SELECT empno, ename, job, mgr, hiredate, sal, comm, deptno, APEX_ITEM.HIDDEN(1, rowid) AS sort_col FROM emp ORDER BY display_seq
Edit SORT_COL attributes:
Set Display Type to Standard Report column.
Add to column Link Text
<img class="sort-row" src="#IMAGE_PREFIX#ws/sort.gif" alt="" />#SORT_COL#
Change Target to URL and URL #
When you submit page you get rowid in APEX_APPLICATION.G_F01 array.
It works. Thanks!
To summarize and to understand your solution to 100%.
You add a hidden item where the value is the rowid. This hidden item is shown in the columne of the report. (I set the Display Type to "Hidden" not to "Standard Report column").
Confusing because it is an hidden item ^^
Then you define a Columne Link Text, a Target and the URL. This is what I do not understand completely.
Thanks a lot.
APEX_ITEM.HIDDEN generates HTML for input type hidden. Because IR is not tabular form, you need set column as visible "Standard report column".
I did use column link text to enter image tag, because I do not like write HTML to query.
When we set URL as #, link do not redirect anywhere. You need have something in URL, if you use column link.