2015-05-11 38 views
0

我試圖在jqgrid標題部分顯示twitter引導程序圖標,但圖標未顯示。這裏是小提琴手:https://jsfiddle.net/99x50s2s/31/顯示bootstrap圖標以及jqgrid標題文字

代碼嘗試:

jQuery("#sg1").jqGrid({ 
    datatype: "local", 
    gridview: true, 
    loadonce: true, 
    shrinkToFit: false, 
    autoencode: true, 
    height: 'auto', 
    viewrecords: true, 
    sortorder: "desc", 
    scrollrows: true, 
    loadui: 'disable', 
    colNames:['Inv No','Date', 'Client', 'Amount','Tax','Total','Notes'], 
    colModel:[ 
     {name:'id',index:'id', width:60, sorttype:"int"}, 
     {name:'invdate',index:'invdate', width:90, sorttype:"date"}, 
     {name:'name',index:'name', width:100}, 
     {name:'amount',index:'amount', width:80, align:"right",sorttype:"float"}, 
     {name:'tax',index:'tax', width:80, align:"right",sorttype:"float"},  
     {name:'total',index:'total', width:80,align:"right",sorttype:"float"},  
     {name:'note',index:'note', width:150, sortable:false}  
    ], 
    caption: "<i class'glyphicon glyphicon-alert'></i> Pending" 
}); 

電流輸出:

enter image description here

預計:

enter image description here

我錯過了什麼?是否有可能在jqgrid標題中顯示引導程序圖標?請建議。

+0

嘗試添加$( 'UI-jqGrid的標題。 ')addClass(' glyphicon glyphicon警報')。 ; – Sushil

+0

@Sushil,它沒有工作。 –

+1

嘗試此https://jsfiddle.net/99x50s2s/32/ – Sushil

回答

1

這是一個錯字。這是因爲丟失了=

caption: "<i class'glyphicon glyphicon-alert'></i> Pending" 

應該是:

caption: "<i class='glyphicon glyphicon-alert'></i> Pending" 

https://jsfiddle.net/99x50s2s/33/

+0

好的。我不知道我是如何錯過它的。但該圖標仍未顯示。 –

+0

你在jsfiddle中看不到圖標嗎?它爲我顯示。 –

+0

我現在看到它。謝謝。 –