Simple Column Filtering Questions

Simple Column Filtering Questions

bobleeboblee Posts: 1Questions: 0Answers: 0
edited April 2012 in General
Hi guys,

Sorry if this question seems a bit basic, I'm not too familiar with Javascript.

Anyways, I'm currently working on a DataTables table with column sorting:

http://datatables.net/release-datatables/examples/api/multi_filter_select.html

My datatable data contains links, for instance:

[code]
1111
Bob Lee
Bob is a pretty cool guy...
2
Edit / Delete
[/code]

Thus, when I try to do column sorting, the drop down menu would show [code]Bob Lee">Bob Lee[/code] instead of just [code]Bob Lee[/code]. My question is, how should I change my links so that the drop down would just show Bob Lee?


Another question is, how do I disable the drop down menu for column five (in my case the column that has the edit and delete links)?

I would greatly appreciate any and all help.

Thanks in advance,
Bob

Replies

  • allanallan Posts: 63,810Questions: 1Answers: 10,516 Site admin
    > My question is, how should I change my links so that the drop down would just show Bob Lee?

    In the fnCreateSelect function (assuming you are using that) you would need to strip the HTML from the data that is used to build the select list.

    > how do I disable the drop down menu for column five (in my case the column that has the edit and delete links)?

    Alter the caller of fnCreateSelect to not call it for the column(s) that you don't want it to operate on :-)

    Allan
This discussion has been closed.