Colreorder func breaks the cusotm cell editor options

Colreorder func breaks the cusotm cell editor options

onkaronkar Posts: 3Questions: 0Answers: 0
edited May 2012 in DataTables 1.8
When I use jeditable and colreorder functions simultaneously the cell editors do not switch correctly and get overridden.

My table has 4 (identity,startDate,name,status) columns and each column has a different custom editor attached to it through the jeditable plugin.
editors used on columns before colreorder is done : (identity:text,startDate:date,name:textarea,status:dropdown)

Now lets say i use colreorder on this table and when i drag column no 3 on to column no 2 then after the fnDraw completes the column 2 has the editor type of textarea but the column 3 now also has the editable option of text area. So basically the column editors do not move along with the colreorder.

editors used on columns after colreorder is done : (identity:text,name:textarea,startDate:textarea,status:dropdown)

Any help is appreciated :)
Thanks in advance.

Replies

  • onkaronkar Posts: 3Questions: 0Answers: 0
    Hi Alan,
    Any comments on this? Any help / pointers would be grat help

    Thanks
    Onkar
  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin
    I haven't been using jEditable much in DataTables, so I'm afraid I don't know what is going wrong here. It sounds like you might have a fixed column index somewhere that is statically defined when the table is initialised, and then when eh columns are reordered, that index isn't being updated.

    ColReorder will fire the 'column-reorder' event (from the DataTables instance) which you could listen for and then alter the column indexes as needed.

    Allan
  • earlearl Posts: 3Questions: 0Answers: 0
    [quote]allan said: ColReorder will fire the 'column-reorder' event[/quote]

    could you please give a simple example on how to bind functions to column reorder event?
    i can't seem to find any.

    thanks
This discussion has been closed.