我有一个包含三个字段的记录,它们都是下拉列表。如果它们是独立的记录,这一切都很好,但是我希望如果您更改第一个下拉列表,那么第二个下拉列表中的项目列表会更改吗?这在 jqgrid 中是否可能。
我的代码的简化版本现在看起来像这样:
jQuery("#marketDataGrid").jqGrid({
mtype: "POST",
url: "/Application/MarketData/" + id,
datatype: "json",
colNames: ["", "Id","Source", "API"],
colModel: [
{ name: "ApplicationId", index: "ApplicationId", hidden: true, width: 0, editable: true, editoptions: { readonly: true} },
{ name: "Id", index: "Id", hidden: false, width: 30, editable: false, editoptions: { readonly: true} },
{ name: "MarketDataSource", index: "MarketDataSource", editoptions: { dataUrl: "/MarketDataSource/GetSelectDataRequired" }, editrules: { required: true }, editable: true, edittype: "select", width: 155, stype: 'select', searchoptions: { sopt: ['eq', 'ne'], dataUrl: "/MarketDataSource/GetSelectData"} },
{ name: "API", index: "API", editoptions: { dataUrl: "/API/GetSelectDataRequired" }, editrules: { required: true }, editable: true, edittype: "select", width: 155, stype: 'select', searchoptions: { sopt: ['eq', 'ne'], dataUrl: "/API/GetSelectData"} }
],