Need to get value of a cell in a hidden column
Need to get value of a cell in a hidden column
How can i do this?
I can get the value of cells that aren't hidden by getting the tr node then taking the html() of a child td, but i don't know how to do this for hidden columns becauuse the html isnt rendered.
Is there a technique or function that could accomplish this ( or something like it? )
ALSO, my table is sorting on load which i do not want. It's sorting based on the first inserted column, which is a hidden column. I need to disable this. I only want to be able to sort based on user input (i.e. click a header) only.
Thanks, G
I can get the value of cells that aren't hidden by getting the tr node then taking the html() of a child td, but i don't know how to do this for hidden columns becauuse the html isnt rendered.
Is there a technique or function that could accomplish this ( or something like it? )
ALSO, my table is sorting on load which i do not want. It's sorting based on the first inserted column, which is a hidden column. I need to disable this. I only want to be able to sort based on user input (i.e. click a header) only.
Thanks, G
This discussion has been closed.
Replies
to change the sort, you'll have to sort by some other column or no column ([]) http://www.datatables.net/ref#aaSorting
How do i sort by some other column on load? I want sort by no column. does bSort take parameters?
I've tried setting bSort to false, which solves the problem (it's sorted how it should be based on MySQL) but then sorting is disabled for column headers. Is it possible yet to set bSort to true after the table is loaded?
I've also tried setting bSort to false, and when initializing all of the columns setting bSortable to false for all columns except the two rows MySQL sorts by, with the idea that it would just mirror the MySQL sort since it seems to insist on wanting to sort something. This also fails: the table is initialized sorted by the first column again, even though bSortable is set to false for that column.