级联下拉列表未将值传递给操作方法 [英] Cascading dropdown is not passing value to the action method

查看:62
本文介绍了级联下拉列表未将值传递给操作方法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用两个Kendo Dropdownlists作为级联下拉列表,但是当我的表单被提交时,第二个下拉列表的值和文本都没有被传递给action方法。

My使用Kendo网格的Editortemplate打开局部视图,我的下拉菜单如下

Hi, I am using two Kendo Dropdownlists as Cascading dropdowns, but when my form is being submitted, the value and text both of the second dropdown is not being passed to the action method.
My partial view is being opened with Editortemplate of the Kendo grid, my dropdowns are as below

<pre>@model DHCS.BH.Provider.Models.ProviderService

@using (Html.BeginForm())
{
    @Html.AntiForgeryToken()

    <div class="k-edit-form-container">
        <ul class="errors"></ul>
        <div class="editor-label" style="display:none;">
            @Html.LabelFor(model => model.PKProviderServiceId)
        </div>
        <div class="editor-field" style="display:none;">
            @Html.Kendo().TextBoxFor(model => model.ProviderId)
        </div>
        <div class="editor-label" style="display:none;">
            @Html.LabelFor(model => model.ServFuncCatMCModeOfServiceId)
        </div>
        <div class="editor-field" style="display:none;">
            @Html.Kendo().TextBoxFor(model => model.ServFuncCatMCModeOfServiceId)
        </div>
        <div class="editor-label" style="display:none;">
            @Html.LabelFor(model => model.ServiceFunctionCategoryId)
        </div>
        <div class="editor-field" style="display:none;">
            @Html.Kendo().TextBoxFor(model => model.ServiceFunctionCategoryId)
        </div>
        <div class="editor-label">
            @Html.LabelFor(model => model.MSSF)
        </div>
        <div class="editor-field">
            @Html.Kendo().DropDownListFor(model => model.MSSF).Name("MSSF").DataSource(source => { source.Read(read => { read.Action("GetMSSF", "LookUp"); }); }).OptionLabel("Select").DataTextField("Text").DataValueField("Text")@*.HtmlAttributes(new { id = "idMSSF" })*@
            @Html.ValidationMessageFor(model => model.MSSF, "", new { @class = "text-danger" })
        </div>
        <div class="editor-label">
            @Html.LabelFor(model => model.MCMS)
        </div>
        <div class="editor-field">           
            @Html.Kendo().DropDownListFor(model => model.MCMS).Name("MCMS").OptionLabel("Select").DataTextField("Text").DataValueField("Text").DataSource(source => { source.Read(read => { read.Action("GetMCMSByMSSF", "Provider").Data("filterMCMS"); }).ServerFiltering(true); }).Events(e => e.DataBound("onMCMSDataBound")).AutoBind(false).CascadeFrom("MSSF")
            @Html.ValidationMessageFor(model => model.MCMS, "", new { @class = "text-danger" })
        </div>
</div>
}


<style>
    .k-edit-buttons.k-state-default {
        visibility: visible;
    }

</style>





如果我遗漏了什么,请帮帮我,任何帮助都会非常有帮助,在此先感谢。



我尝试过:



谷歌搜索尝试不同的选项等但到目前为止没有任何帮助。



Please help me if I am missing anything, any help would be greatly helpful, thanks in advance.

What I have tried:

googling trying with different options etc but nothing helped so far.

推荐答案

你需要一起讨论吗?


当然,请让我知道我的朋友,我真的需要帮助。
Sure, please let me know how my friend, I really need the help for this.


这篇关于级联下拉列表未将值传递给操作方法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆