0

In Oracle APEX, I have a table that describes a one-to-many relation which is ordered with a column. So something like this:

create table T_MASTER (
  MASTER_GUID         RAW(16) DEFAULT ON NULL sys_guid(),
  MASTER_NAME         VARCHAR2(50) NOT NULL,
  MASTER_DESC         VARCHAR2(200) NOT NULL,

  constraint T_MASTER_PK primary key (MASTER_GUID)
);

create table T_DETAIL (
  DETAIL_GUID         RAW(16) DEFAULT ON NULL sys_guid(),
  MASTER_GUID         RAW(16) NOT NULL,
  DETAIL_NAME         VARCHAR2(50) NOT NULL,
  DETAIL_DESC         VARCHAR2(200) NOT NULL,
  DETAIL_ORDER        NUMBER NOT NULL,

  constraint T_DETAIL_PK primary key (DETAIL_GUID),
  
  constraint T_DETAIL_FK_MASTER_GUID foreign key (MASTER_GUID) references T_MASTER (MASTER_GUID)
);

DETAIL_ORDER defines the order of the detail to appear. When displaying the detail in an editable interactive grid I can sort the initial values by DETAIL_ORDER. But after that the user can modify the displayed order in any way they want. I want to use the ordered functionality of the IG to automatically assign the DETAIL_ORDER column. I am aware of the method of assigning the order values like so (if you switch a row to be between two rows its new order is the midpoint of the two rows), but again I have no idea how to incoorporate this into Oracle APEX's Interactive Grid.

1 Answer 1

0

There is an example of this in the IG Cookbook (version 6) that can be downloaded here. Have a look at page 11 (Tasks (reorder, checkbox)). I know posting links is not encouraged on this forum but that is a lot of code to copy and paste :).

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.