Read Value of Hidden Column in JQuery

前端 未结 8 546
青春惊慌失措
青春惊慌失措 2020-12-20 13:09

I need to hide a column on the table, but after that I cannot read selected row\'s hidden column value.

 dtTable = $(\'#lookupTable\').DataTable({
       \"c         


        
相关标签:
8条回答
  • 2020-12-20 13:55

    The correct answer is pretty old. So, if the correct answer does not work out for you. Please try this method :

    selectedIndex = dtTable.row(this).data();
    

    This code will return the raw json object which was fetched for this row. something like :

    {
       "modify":"false",
       "lastModify":"Tuesday",
       "name":"abc",
       "DT_RowId":"row_1",
       "fileID":"0bde976"
    }
    

    To get the "fileID" you just need to :

    alert("ID = "+selectedIndex.fileID);
    
    0 讨论(0)
  • 2020-12-20 13:59

    Another Soultion Is Add Css Class ID Fiekd Visbilety hideen And $(this).find('td:eq(0)').text(); Retrive The value..

    0 讨论(0)
提交回复
热议问题