2013-12-16 66 views
1

我使用asp.net MVC 4在jQuery UI中显示数据jtbale。 我在面对jtable单元格单击显示新视图时遇到问题。 我想要的是,当jtable加载数据时,我有一个额外的列名称加载,当我点击该列时,一个弹出窗口应该显示一个新的视图,其中包含该患者的baisc信息。下面我分享jtable的图像。在jtable单元格上显示弹出菜单

我的JTable enter image description here

图片是否有可能

回答

1

在你的jQuery

$.ajax({ 
    url: "@(Url.Action("Action", "Controller")", 
    type: "POST", 
    data: { id: $(this).id } 
    cache: false, 
    async: true, 
    success: function (result) { 
     $(".divContent").html(result); 
     //pop up the partial view using overlay, dialog, whatever you prefer 
    } 
}); 

,并在控制器上有一个方法

public PartialViewResult Action(int id){ 
    model = //query the database 
    return PartialView("_PartialName", model); 
} 

看到使用Ajax调用这里获取更多关于gettin的信息g表格行id按钮点击(也可以链接,也可以使用选择器)jQuery: Get the contents of a table row with a button click

相关问题