Need to get value of a cell in a hidden column

Need to get value of a cell in a hidden column

gloosemogloosemo Posts: 27Questions: 1Answers: 0
edited September 2011 in General
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

Replies

  • fbasfbas Posts: 1,094Questions: 4Answers: 0
    http://www.datatables.net/ref#fnGetData

    to change the sort, you'll have to sort by some other column or no column ([]) http://www.datatables.net/ref#aaSorting
  • gloosemogloosemo Posts: 27Questions: 1Answers: 0
    ok fnGetData works thanks.

    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.
  • gloosemogloosemo Posts: 27Questions: 1Answers: 0
    a crap didnt notice the second link you put up. thanks
This discussion has been closed.