Can someone please show the proper way to use buttons to move up/down in a ListView control AND save the contents of the index to a table?
I have 2 ListView controls – one for available values and one for selected values. When values are selected, the index of the selected element is inserted into a table for use in re-displaying later. I have code in the clicked method of the up/down buttons which works fine but is not saving the changes because no insert is done. One caveat, the index of the selected element is an index on the table it is written to if that has any effect on re-arranging the elements.
int i = ListSelected.getNextItem(FormListNext::Selected);
ListSelected.moveItem(i, i-1); // or (i, i+1)