Thursday, 29 December 2016

Dynamically ordering of rows



Step 1:
Create a tabular form with the query and add a null column at last
Step 2:
Report attributes à NULL column à HTML Expression
<img id="down_#ROWNUM#" style="cursor:pointer;"
onclick="f_row_down(this)"
src="/i/arrow_down_gray_dark.gif" />
<img id="up_#ROWNUM#" style="cursor:pointer;"
onclick="f_row_up(this)"
src="/i/arrow_up_gray_dark.gif" />
Step 3:
Give display as Standard Report Column
Step 4:
Add 2 functions in the page header for changing the rows order.
function f_row_down (pThis, a)
{
//alert(a);
$("#P23_Y").val(a);
html_RowDown(pThis);
apex.submit('DOWN');
}


function f_row_up (pThis,pThat,a)
{
html_RowUp(pThis);
$("#P23_Y").val(a);
apex.submit('DOWN');

}


By 
A.Arun Kumar

No comments:

Post a Comment