Sorry I just realised I put columns instead of ROWS in the subject!
... so far it seems like the only way to do this is to loop over each
row to find out what its index is and then send that to mySQL :S argh..

--- In [email protected], "ozflex" <[EMAIL PROTECTED]> wrote:
>
> Hi all,
> 
> I have a normal dg which is pulling data from MySQL db and i'm trying
> to figure out the best way to allow users to drag the rows to re-order
> as per however they may want it.. 
> 
> This is what I thought buy some feedback would be great!
> 
> 1. Add 'order' column to sql db
> 2. Set inital order for each row
> 3. sort by order desc when pulling db into dg
> 4. Create function to:
>      a. when a user drops a row into desired position make each rows
> order = each rows index
>      b. update mysql db when all changes are complete
> 
> I also thought, maybe remember oldOrder val, + 1 to each order value
> from point of insertion until order = oldOrder??
> 
> Obviously this method has issues when the # of rows grows.. so thats
> why I would love some help with this! there must be a better way :)
> 
> Thanks in advance!
> 
> Matt (OzFlex Adobe User Group - Melbourne)
>


Reply via email to