2017-04-11 55 views
1

現在我有兩個想法將兩個數據合併到一列中,但是當我用我的方式解決時出現了錯誤。
第一種方式肯定不對的,因爲傾斜只是把+把它們結合起來jquery-bootgrid如何在同一列中合併兩個數據值

<th data-column-id="NO_ID" >N0</th> 
change to---> <th data-column-id="NO_ID + USR_ID" >N0</th> 

這是第二種方式,因爲我已經使用一個格式化調用命令來顯示按鈕無法使用,我不能讓這兩個命令和測試工作

<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> 

回答

0

我發現了同樣的問題 似乎需要改變bootgrid.js文件....

+1

rombastic ...... –

0

是的,你可以使雙方的工作是這樣的:

$('#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... 
}); 
相關問題