单击网格中的链接后如何弹出
问题描述:
我正在MVC4中做一个小型应用程序.我有一个网格,单击它的每一行都有一个链接,它将弹出一个对话框.但是这里的问题是,当我单击``编辑''链接时,弹出窗口随之消失并消失了,我的网格也消失了. />
这是我的网格渲染代码:
Hi, I''m doing a small application in MVC4. I had a grid with a link in each row on clicking It will popup a dialog box.But here my problem is when I clicked on ''Edit'' link the popup comes and disappear along with it my grid also gets disappeared.
Here is my grid rendering code:
@grid.GetHtml(
tableStyle: "webgrid-table",
headerStyle: "webgrid-header",
footerStyle: "webgrid-footer",
alternatingRowStyle: "webgrid-alternating-row",
rowStyle: "webgrid-row-style",
columns: grid.Columns(
grid.Column(columnName: "FloorCode", header: "FLOOR"),
grid.Column(columnName: "SeatCode", header: "SEAT"),
grid.Column(columnName: "FloorName", header: "FLOOR-NAME"),
//grid.Column(columnName:"EmpId", header:"EMPLOYEE-ID"),
grid.Column(header: "Action",
style: "text-align-center",
format: (item) => Html.ActionLink("Edit",null,null,new { @class = "move-link" }))))
>
单击编辑"链接时调用的ajax代码:
The ajax code that is invoked on clicking the ''Edit'' link:
$('.move-link').click(function (event) {
debugger;
$('#dialog2').show();
$('#EmpId').val("");
$('#CSeat').val("");
$('#CFloor').val("");
$("#ddlFloorName").val("--select--");
$("#ddlSeatCode").val("--select--");
});
$("#btnClose2").click(function (e) {
HideDialogs2();
e.preventDefault();
});
所以请帮助我..
so please help me..
答
(' . move-link').click(function(事件){ 调试器;
('.move-link').click(function (event) { debugger;
(' #dialog2').show( );
('#dialog2').show();
(' #EmpId').val( " );
('#EmpId').val("");