Getting and sorting options

Hi,

I have a list of possible columns that can be shown on a grid such as column1, column2 …
I would like the user to be able to select what columns they want to show then be able to order them as they require. All i require is blocks with the column names or something equivalent.

I was thinking of having dragging boxes where the user selects what columns then can drag them to reorder them. I looked at the DragDrop sample and this is on the right track, however it seems that there can only be one DragDrop component per DragID.

Has anyone done anything like this?

Thanks

Been eons since I did either of these two things:

Sorting column content by ascending or descending is well documented. Essentially though, don’t build the table and discard the data but save the data in an array and then use the compare() callback on .sort() function.

Ordering (not really a sort) columns by drag and drop (I think I also did rows) was a bear but, if I remember correctly, created and array of drop ids…

Thanks for your reply.

I’ve just completed drag and drop from a cell in a grid to cell in another grid. You could do similar just drag within the same grid. I didn’t end up using .draggable. I got it using a label that moves onmousemove and detects the cell it is over onmouseup. It ended up terribly complicated in code but looks and works beautifully to the user, so I’m happy.