Using HTML5 data-* attribute for orderable

Using HTML5 data-* attribute for orderable

Bird87_ZABird87_ZA Posts: 2Questions: 1Answers: 0

I've been trying to figure this out using some examples on the site. However, I'm not getting it to work.

I want to use the data-* attribute to disable ordering on the last of 3 columns. This is what I have so far:

<table class="table table-striped table-hover " data-columns="[null,null,{&quot;orderable&quot;: false}]">

What am I doing wrong or missing? As stated, I based this off examples on the site. Thanks in advance.

Answers

  • allanallan Posts: 62,316Questions: 1Answers: 10,226 Site admin

    The column properties should be assign to the header cell for that column - as shown in the manual for the class name. For example you might use:

    <th data-orderable="false">my column</th>
    

    Allan

  • Bird87_ZABird87_ZA Posts: 2Questions: 1Answers: 0

    I completely missed that. Thanks for the response. Works perfectly!

This discussion has been closed.