cshtml页面:

1 <wt:combobox field="Entity.ServicenameCodeID" items="AllServicenameCodes" link-field="@Model.AllshippingmethodsID" trigger-url="/ChannelApiInfor/GetServicenameIDByshippingmethod" />
2         <wt:combobox field="@Model.AllshippingmethodsID" items="Allshippingmethods" multi-select="true" />

 控制器方法:

1 [ActionDescription("级联")]
2         public IActionResult GetServicenameIDByshippingmethod(Guid id)
3         {
4            var vm= DC.Set<ShippingMethod>().Where(c => c.ServicenameCodeID == id).Select(m=> new { Text=m.cnname,Value=m.ID}).ToList();
5             
6             return Json(vm);
7         }

另外可以参照一下图片:

posted on 2018-06-20 09:37  灰*兔  阅读(432)  评论(0编辑  收藏  举报