Master, help!!Column Render Get Other Column Data
Master, help!!Column Render Get Other Column Data
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
The full data object / array for the row is available in the third parameter passed into the
columns.render
function - calledfull
in your above code.Allan
thank u very much. I wish your team better and better!