Options empty in dropdown select

Options empty in dropdown select

Wizard85Wizard85 Posts: 9Questions: 2Answers: 0

This is my example:

http://live.datatables.net/diwapewa/84/edit

I need to have a column fixed, need to use dropdown filter (possibly with bootstrap-select multiple options).

Currently the bootstrap select don't get any option in the list. And also there are some mis-alignement on the fixed colum

Answers

  • Wizard85Wizard85 Posts: 9Questions: 2Answers: 0

    Sorry, this is the correct example:

    http://live.datatables.net/kijujaha/1/edit

  • allanallan Posts: 54,703Questions: 1Answers: 8,556 Site admin

    Hi,

    You have scrollX: false, which means FixedColumns basically won't do anything since there is no X scrolling.

    With it enabled the fixed column is there but the header will not reflect the Bootstrap select dropdown. The way FixedColumns works is to clone the original elements and overlay clones on top of the element. That is the point at which you could manipulate the header cell FixedHeader puts into the table (i.e. with a draw event).

    An alternative, and simpler option, is to use SearchBuilder or in some other way move your filtering elements out of the header.

    This is a limitation that I'm aware of and will be addressing in future.

    Allan

  • Wizard85Wizard85 Posts: 9Questions: 2Answers: 0

    I have an issue with ajax reload and rebuilding the select dropdown options.

    Imagine this example http://live.datatables.net/kijujaha/1/edit but using ajax, now at some point in my table I call ajax reload to get new data, and I need to update the options in the dropdown select, how can I achieve that in an easy way?

    Do I need to "destroy" in someway the bootstrap selects and re-build them from scrach?

  • kthorngrenkthorngren Posts: 13,788Questions: 25Answers: 3,243

    Move the code in initComplete, that builds the select lists, into a function. Call that function in initComplete and call that function when using ajax.reload().

    Kevin

Sign In or Register to comment.