如何使用javascript绑定剑道网格单元

如何使用javascript绑定剑道网格单元,javascript,kendo-grid,Javascript,Kendo Grid,我在应用程序中使用了剑道网格。 在网格中,一行包含dropdownlist。当我在下拉列表中选择该值时,行中的另一个单元格将被更新。 但我正试图用javascript更新另一个单元格。我无法找到解决方案 有人能帮我吗 我的剑道网格在剃须刀: @(Html.Kendo().Grid<models.employee>() .Name("grid") .Columns(columns => {

我在应用程序中使用了剑道网格。 在网格中,一行包含dropdownlist。当我在下拉列表中选择该值时,行中的另一个单元格将被更新。 但我正试图用javascript更新另一个单元格。我无法找到解决方案

有人能帮我吗

我的剑道网格在剃须刀:

    @(Html.Kendo().Grid<models.employee>()
            .Name("grid")
            .Columns(columns =>
            {
                columns.Bound(c => c.name).ClientTemplate(
                    "<input type='hidden' name='items[#= index(data)#].name' value='#= getLine(data)#' /> <p>#= getLine(data)#</p>"
                );
                columns.Bound(c => c.Emp_num).EditorTemplateName("EmpEditor").ClientTemplate(
                        "#= Emp_num #" +
                        "<input type='hidden' class='Emp-select' name='items[#= index(data)#].Emp_num' id='items[#= index(data)#].Emp_num' value='#= Emp_num #' />"
                    );
                columns.Bound(c => c.description).EditorTemplateName("DescripEditor").ClientTemplate(
                    "#= description #" +
                    "<input type='hidden' name='items[#= index(data)#].description' data-fill='items[#= index(data)#].description' value='#= description #' />"
                );
columns.Bound(c => c.address).EditorTemplateName("addressEditor").ClientTemplate(
                "#= address #" +
                "<input type='hidden' name='items[#= index(data)#].address' value='#= address #' data-fill='items[#= index(data)#].address' value='' />"
            );
    })
javascript:

function changes(e)
{
    var Emp_num = this.dataItem(e.item).Emp_num;  // which gives the employee num

    getEmp(Emp_num, function (emp) {    //this function retrieve the details of employee for the particular employee number

        var Employee = emp;

        //here I need the code for update the values of Employee.description to description cell and Employee.address to address cell


    });
}

在没有看到代码的情况下,我想象您有某种模板,它将dropdownlist定义为剑道网格列定义的一部分,对吗?您需要编写一个JavaScript函数来更新单元格,并将其添加到此dropdownlist的onChange中。剑道文档可能涵盖了这一点。

你应该发布一些代码,帮助人们了解你在做什么。它会提供一些背景,你的问题会得到更多的关注。此外,这是一个相当广泛的问题,需要了解剑道UI、JavaScript(可能是jQuery…)和HTML。你通常会发现,如果你能合理地集中注意力,你会得到更好的回应。
function changes(e)
{
    var Emp_num = this.dataItem(e.item).Emp_num;  // which gives the employee num

    getEmp(Emp_num, function (emp) {    //this function retrieve the details of employee for the particular employee number

        var Employee = emp;

        //here I need the code for update the values of Employee.description to description cell and Employee.address to address cell


    });
}