Master, help!!Column Render Get Other Column Data

Master, help!!Column Render Get Other Column Data

HappyJsHappyJs Posts: 6Questions: 3Answers: 0

I'm taking a mixed development model. Html to write special time, columns and data provided by webApi. In the preparation of webApi, I need to write a attribute, this attribute can make the column rendering as a hyperlink.
Problem: This hyperlink requires a get parameter, which needs to be retrieved from the json data in its row. How do I get the values of other columns in the data source in the column's rander method?

"
.dataTable({
columns:[
{
title:"a",
data"b",
render:function(data,type,full,meta){
return "<a href='google.com?othercolumnvalue=????'>"+data+"</a>";// how to get other column data?
}
}
]
});
"

"Online waiting for the answer, quick quick quick quick quick" ← (Chinese developers feature)

Finally, once again thank the platform and you do things, to provide developers with a very good help
:) :) :) :) :) :) :) :) :)

This question has an accepted answers - jump to answer

Answers

  • allanallan Posts: 63,831Questions: 1Answers: 10,518 Site admin
    Answer ✓

    The full data object / array for the row is available in the third parameter passed into the columns.render function - called full in your above code.

    Allan

  • HappyJsHappyJs Posts: 6Questions: 3Answers: 0

    thank u very much. I wish your team better and better!

This discussion has been closed.