neo314
Posts: 5
|
| Posted: 04/10/2010, 4:38 AM |
|
Is there anything built in or a known good method for giving backend users the ability to reorder table rows based on a unique field like that offered by the soon to be dead ADDT?
|
 |
 |
andy
Posts: 183
|
| Posted: 04/18/2010, 10:49 AM |
|
No easy way.
But I guess you start off by creating a "sortorder" field (integer) and displaying it in your editable grid as an editable field.
When you insert a new record you get the max sortorder field value, add one and assign it.
To edit an existing value, you will have to manipulate all the preceding record sortorder field values if you are promoting it or manipulate all the following record sortorder field values if you are relegating it.
You could also have an up arrow and down arrow in each record, which would promote/relegate that record by one. That would be a little easier to code and could be done with javascript to speed up execution and avoid having to refresh the page until you have finished editing...
Just some thoughts.
_________________
Andy
RAD tools for rich UI controls:
http://www.koolphptools.com |
 |
 |
|