datatables 1.10.9 column search

datatables 1.10.9 column search

BillcBillc Posts: 2Questions: 1Answers: 0

Hello everyone,
I'm a newbie, so take it easy on me. I'm currently working on a rewrite of an OLD legacy website and am loving the general look and feel of the datatables! Maybe too much information but, my data is in a legacy non relational database so i'm having to use asp.net to building data wrappers around everything. That is working fine.

The problem is in the column search. on column one, I'm adding a <a> link to access the data using an ajax control with an encrypted value. When I use the standard example code, the drop down has dates like, 05/27/2015">05/27/2015. How can I limit the dropdown to the html text value of 05/27/2015? it would also be nice to sort each of the columns by type. First 2 are dates then mostly string values.

I've included a link to a jsfiddle with a sample so you can see the dropdown...

https://jsfiddle.net/bclohan/yvnj1x2d/

Any help would be greatly appreciated.

This question has an accepted answers - jump to answer

Answers

  • jLinuxjLinux Posts: 981Questions: 73Answers: 75
    edited October 2015 Answer ✓

    What I would be doing, is having the table just hold the date, no HTML (meaning no link), so that way it will pull just the date into the footer dropdown, then use the columns.render setting under columnDefs to render it as a link when it is displayed

    Demo: https://jsfiddle.net/yvnj1x2d/4/

  • BillcBillc Posts: 2Questions: 1Answers: 0
    edited October 2015

    Thanks. I'll probably have to modify my approach as I'll need to place the encrypted value to link to in the display either in a hidden column then add it to the <a> link. OR I might use the row().index() to determine the row number selected and then correspond that back to the dataset in the back end.

    Thanks again for the assistance!

This discussion has been closed.