Duplicate input elements in fixed columns

Duplicate input elements in fixed columns

brianKbrianK Posts: 9Questions: 5Answers: 0

I would like to put some input elements into my datatable like checkboxes and text fields. For example, a row select checkbox. One problem I have encountered is that Datatables makes two copies of the columns that don't scroll (I am using the FixedColumns extension). Is there a workaround so I only get the value from the visible input control? Is adding input controls to a table a valid idea otherwise? The only idea I have come up with so far is to add a changed handler on the field and set the other copy to the same value.

Answers

  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin

    Input controls in the fixed columns are quite tricky. As you say, the elements are cloned, so there is a disconnect between the originals and the clones. There is no problem having input elements in a table, but if you have them in a fixed column as well, you need to have some Javascript to link between the clone and original.

    I'm going to be done some work next week on TableTools to support row selection with FixedColumns. It won't support checkboxes, but it might be useful for you?

    Allan

  • brianKbrianK Posts: 9Questions: 5Answers: 0

    Thanks Alan, I was able to synch the two with javascript. TableTools might help. I need to demo my work to my customer and decide what interface to use. I also just wanted to say "thanks" for your work on Datatables and putting the free version out there.

  • germangergermanger Posts: 1Questions: 0Answers: 0

    Is there a solution for this problem now?

  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin
    edited August 2014

    For the input elements in the FixedColumns? No - that isn't something that I'm planning on directly supporting in FixedColumns since they are different elements and it would be virtually impossible to support full 2 way binding for all possible cases.

    Allan

This discussion has been closed.