我有一个kendo组合框客户端,我用
填写他的内容.DataSource(
source =>
{
source.Read(read => { read.Action("GetAllClientsJSONCombo", "CrmCProfile"); });
})
现在,我有另一个kendo组合框ContactsClient,但我需要在第一个组合框中传递所选客户端的ID,如下所示:
.DataSource(source =>
{
source.Read(read =>
{
read.Action("GetAllContactsClientJSONCombo", "CrmCProfile", new object { Id_Cliente = (????????)});
})
.ServerFiltering(false);
})
感谢。
答案 0 :(得分:0)
如果您不写new object
,只需指定单词new
.DataSource(source =>
{
source.Read(read =>
{
read.Action("GetAllContactsClientJSONCombo", "CrmCProfile", new { Id_Cliente = Model.Value});
})
.ServerFiltering(false);
})
OR
.DataSource(source =>
{
source.Read(read =>
{
read.Action("GetAllContactsClientJSONCombo", "CrmCProfile").Data("yourParameters");
})
.ServerFiltering(false);
})
<script>
function yourParameters(){
return {"Id_Cliente": yourParameterValue};
}
</script>
并确保在服务器端,参数的名称(即Id_Cliente
)是相同的。
public JsonResult GetAllContactsClientJSONCombo(string Id_Cliente){
//your logic here
}