shifting selected line UP-down

HI Friends,

I have a form having gridlines. Now i want to add two buttons namely UP and Down . On clicking the buttons the selected record will shift UP-Down.

how to implement it?

pls help

Thanks

The records are sorted in form grid based on the index fields, if you dont have any index then the sorting will be done based on the RecId or you can add a dynamic sorting on the form by accessing queryBuildataSource. One approach is to have a line number which is generated internally, your up/down logic should renumber these line numbers and you can apply the sorting on it dynamically or using an index…

hi Kranti,

can you elaborate it.How to get the linenumber ot the table which is stored internally.

thanks

Hi Kranti,

Thanks for your hint.

Now i am able to do it using linenum

Thanks a lot!!! [:D]