Getting and sorting options


#1

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


#2

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…


#3

Thanks for your reply.