Quantcast
Channel: Recent Discussions — DataTables forums
Viewing all articles
Browse latest Browse all 82291

How do I get a value from source without making it a column?

$
0
0

I have a table of users and I have column (Name) that I wish to render as a link, but only when the row is displaying the currently logged in user. This means that the Person ID for the row source needs to equal the Person ID from session variables.

I know I can make PersonID a column like so:

"columns" : [
    {"data": "PersonID"},
    {"data": "Name"}
]

I only wish to extract the value for comparison though, like the following pseudo code.

"columns" : [
    {"data": "Name"
     "render": function (data, type, full, meta) {
          If(Session.personID = ajaxrow.PersonID){
               return ("<a href="some hyperlink">" + data + "</a>");
          }
     }
]

Is there a way to get this "ajaxrow.PersonID" without showing it in the table?


Viewing all articles
Browse latest Browse all 82291

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>