Hi Hafeez,
Its is possible to do this, but I discourage you do to this unless there is no other way. You can use etp as a sample.
Here are some of the older code I got. It maybe possible that they are too old, that its pre bit varying days.
http://cvs.openacs.org/cvs/openacs-4/contrib/packages/bcms-ui-wizard/www/item-sort-swap.tcl?rev=1.1&view=markup
Good luck.