now i have two idea to combine two data in one column,but something wrong when i using my way to solve.
The first way sure wrong,because cant just put + to combine them
<th data-column-id="NO_ID" >N0</th>
change to---> <th data-column-id="NO_ID + USR_ID" >N0</th>
This is the second way,cannot use because i have already using one formatters call commands to show button,i cant make both commands and test to work
<script>
formatters:
{
"commands": function(column, row)
{
return "<button type=\"button\" class=\"btn btn-xs btn-default command-delete\" data-row-id=\"" + row.NO_ID + "\"><span class=\"glyphicon glyphicon-trash\"></span></button>"
}
"test": function(column, row)
{
return "NO_ID","USR_ID";
}
</script>
我发现同样的问题似乎需要更改bootgrid.js文件....
Yes, you can make both work this way:
$('#yourBootGridTableId').bootgrid({
formatters: {
"commands": function(column, row){
return "<button type=\"button\" class=\"btn btn-xs btn-default command-delete\" data-row-id=\"" + row.NO_ID + "\"><span class=\"glyphicon glyphicon-trash\"></span></button>";
},
"test": function(column, row){
return "<div>" + row.NO_ID + ", " + row.USR_ID + "</div>";
}
},
rowCount: [5, 10, 25],
caseSensitive: false,
selection: false,
multiSelect: false, //Other bootgrid options...
});
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.