CodeCharge Studio
search Register Login  

Visual PHP Web Development

Visually Create Internationalized Web Applications, Web Reports, Calendars, and more.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> General/Other

 Changing table row order

Print topic Send  topic

Author Message
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?
View profile  Send private message
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
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

PHP Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.