$("#NextNodeIds").combobox({
editable: false,
url: "/WorkFlow/NextNodeForComBox?flowId=" + "@Model.FlowNode.FLOW_ID",
valueField: 'NodeId',
textField: 'NodeName',
multiple: true,
onLoadSuccess: function() {
var nodeIds = "@Model.NodeCfg.NextNodeIds";
$("#NextNodeIds").combobox("setValues", nodeIds.split(','));
}
});
<input type="text" class="text" id="NextNodeIds" name="NextNodeIds" panelHeight="130" />
[HttpPost]
public ActionResult NextNodeForComBox(string flowId)
{
var rows = WorkFlowService.SelectNodesByFlow(flowId).Select(o => new { NodeId = o.NODE_ID, NodeName = o.NODE_NAME });
return Json(rows);
}