1

How to make something like this header in jQuery DataTable?

enter image description here

2
  • Please specify in your question what you're having a problem with. Commented Aug 10, 2015 at 8:33
  • My problem is how to make a header in JQuery DatabTable like the picture I posted. Commented Aug 10, 2015 at 8:34

1 Answer 1

3

Yes, see the tabs (mainly the html one): https://www.datatables.net/examples/basic_init/complex_header.html

Applied to your case, http://jsfiddle.net/t4tzwm6c/ (it really is just a matter of html rowspan and colspan)

Snippet:

<table>
  <thead>
    <tr>
      <th rowspan="2">Operation conducted</th>
      <th colspan="3">Drug evidence seized</th>
    </tr>
    <tr>
      <th>Shabu</th>
      <th>Majijuana</th>
      <th>Others</th>
    </tr>
  </thead>
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.