2010-02-23 27 views
2

我有一個asp.net webforms頁面,我在其中使用jqGrid組件。問題是thickbox在jqGrid(ajax)內部的鏈接上無法正常工作。如何在ASP.NET WebForms頁面上使用Thickbox和jqGrid?

我得到了代碼Gupta's blog這個和平的代碼,但我不知道如何添加它,因爲我使用ASP.NET的jqGrid組件。誰能幫忙?謝謝。

gridComplete: function(){ 
// ThickBox - this allows any dynamically created links that use thickbox to work! 
tb_init('a.thickbox, area.thickbox, input.thickbox');//pass where to apply thickbox 
imgLoader = new Image();// preload image 
imgLoader.src = tb_pathToImage;} 

回答

1

您可能要考慮使用顯式調用thickbox。把它放在你的鏈接的onclick上。

inline popup: 
tb_show('title','#TB_inline?height=155&width=300&inlineId=hiddenModalContent&modal=true'); 
or iframed page: 
tb_show('title','myPage.aspx?TB_iframe=true&height=155&width=300&modal=true'); 

看看在ThickBox的網站上的文檔以獲取更多的例子jquery thickbox

+0

感謝皮特。有效。 – 2010-03-01 12:43:08