How to manually determine the select option order

How to manually determine the select option order

atixatix Posts: 2Questions: 1Answers: 0

Hi all,
i have problem with defining custom select option values.
example:
<select>
<option value="A"></option>
<option value="B"></option>
<option value="C"></option>
<option value="D"></option>
</select>

i can do column order with ASC or DESC, but i want to define my order like this:

<select>
<option value="B"></option>
<option value="A"></option>
<option value="D"></option>
<option value="C"></option>
</select>

i find example where The Office column is manual defined and this is it what i want to achieve, but in this example in select columns is multiple select option enabled, i need only one option is enabled to select, not multiple.
http://live.datatables.net/nucojuha/4/edit

This question has an accepted answers - jump to answer

Answers

  • kthorngrenkthorngren Posts: 21,344Questions: 26Answers: 4,954
    Answer ✓

    That technique is independent of the type of select used. There is some select2 code at the bottom of the initComplete function that can be removed if you aren't using select2.

    Kevin

  • atixatix Posts: 2Questions: 1Answers: 0

    ty for reply, i will remove select2 and try.

Sign In or Register to comment.