如何在ASP.NET WebForms页面上使用带有jqGrid的Thickbox?

时间:2010-02-23 22:16:46

标签: asp.net jqgrid thickbox webforms

我有一个asp.net webforms页面,其中我正在使用jqGrid组件。问题是,thickbox不能处理jqGrid(ajax)中的链接。

我在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 个答案:

答案 0 :(得分: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