我在一个页面中有两个 jqgrid 但我的问题是当我单击第一个网格的添加按钮时第一行进入编辑模式很好但是当我单击第二个网格编辑模式的添加按钮进入第二个网格的第二行时进入第一行的状态第二网格的任何解决方案提前感谢
var grid1 = new JQGrid(Name: "ReceiptdetGrid", LoadUrl: "/Receipt/GetGridData",
Columns: new List<JQGridColumn>() {
new JQGridColumn(Name: "Id",ColHeader: "Id", DataType: "string", IsSortable:false, IsFixed:true, IsResize: true,Hidden:true, Width:"0%"),
new JQGridColumn(Name: "Sno",ColHeader: "SNo.", DataType: "string", IsSortable:false, Width:"10%", IsFixed:true, IsResize: true,Hidden:false),
new JQGridColumn(Name: "HeadName",ColHeader: "Head", DataType: "string", IsSortable:true, IsFixed:true, IsResize: true,Width:"45%",IsEditable:true,EditType:"select",Items:(ViewData["headlist"] as List<SelectListItem>),OnChange:"SelectheadChange"),
new JQGridColumn(Name: "Amount",ColHeader: " Amount", DataType: "string",EditType:"text", Width:"45%", IsSortable:false,OnKeyUp:"CalculateTotalAmmount",IsFixed:true, IsResize: true,Hidden:false,IsEditable:true),
}, IsPaging: true, PageSize: "8", EditUrl: "/Receipt/KeepGridData", DeleteUrl: "/Receipt/DeleteGridData", IsSortable: true, FooterRow: true, ShowEmptyRows: true, EditType: JQGridEditType.Inline, IsEdit: true, IsDelete: true, IsInsert: true, Width: "900", Height: "200");
@grid1.GetHtml();
}
第二个jqgrid
var grid2 = new JQGrid(Name: "instru", LoadUrl: "/Receipt/GetGridData",
Columns: new List<JQGridColumn>() {
new JQGridColumn(Name: "Id1",ColHeader: "Id1", DataType: "string", IsSortable:false, IsFixed:true, IsResize: true,Hidden:true, Width:"0%"),
new JQGridColumn(Name: "type",ColHeader: "type", DataType: "string", IsSortable:false, Width:"10%", IsFixed:true, IsResize: true,Hidden:false),
new JQGridColumn(Name: "HeadName",ColHeader: "Head", DataType: "string", IsSortable:true, IsFixed:true, IsResize: true,Width:"45%",IsEditable:true,EditType:"select",Items:(ViewData["headlist"] as List<SelectListItem>),OnChange:"SelectheadChange"),
new JQGridColumn(Name: "Amount",ColHeader: " Amount", DataType: "string",EditType:"text", Width:"45%", IsSortable:false,OnKeyUp:"CalculateTotalAmmount",IsFixed:true, IsResize: true,Hidden:false,IsEditable:true),
}, IsPaging: true, PageSize: "8", EditUrl: "/Receipt/KeepGridData", DeleteUrl: "/Receipt/DeleteGridData", IsSortable: true, FooterRow: true, ShowEmptyRows: true, EditType: JQGridEditType.Inline, IsEdit: true, IsDelete: true, IsInsert: true, Width: "900", Height: "200");
@grid2.GetHtml();
}
当我 ckeck 添加第一个网格的按钮时,它来了但是当我单击第二个网格的添加按钮时,它出现在第二行而不是我的第二个网格的第一行提前谢谢