Possibility to drag / drop listitem from outside a datatable to add new column

Possibility to drag / drop listitem from outside a datatable to add new column

RSiebelingRSiebeling Posts: 10Questions: 0Answers: 0
edited April 2014 in General
Hi,

I'm investigating the possibility to add new columns to a datatable by presenting the user a list with available columns that could be added to the table (outside the datatable) and when the user drags one of the listitems over the datatable and drops it, the columns is added to the datatable.

Preferably showing a nice caret at the place where the column will be dropped / added to the table, like for example is done when reordering the columns...

Is something like this possible?
I think I need to make use of some kind of drag event to show the caret and a drop event when the users drops the column to add the column to the table.

thanks in advance,
Richard

Replies

  • allanallan Posts: 63,689Questions: 1Answers: 10,500 Site admin
    Sorry no. There is no option in DataTables to dynamically add a new column to a table at the moment. You could destroy and recreate the table with the new table, but I'm not aware of anyone having writ then the code to do a drag and drop to add a column.

    If you do write such code, perhaps you could share it here so we can all benefit from it?

    Allan
  • RSiebelingRSiebeling Posts: 10Questions: 0Answers: 0
    ok, thanks for the update, I will look into it and will post the code when I have something,
    Richard
This discussion has been closed.