Kendo UI web Grid字段模板

时间:2015-06-18 14:06:46

标签: ajax kendo-ui

我有一个具有Customers字段statusId的表。 StatusId CustomerStatuses在包含字段ID和名称的表中。如果我想使用ajax显示表格字段名称,如何使用模板:

{
  field: "statusId", title: "Customer", with: 300,                    
  template: editTemplate
},

function editTemplate(row) {        
        $.ajax({
            url: "/Patients/GetGuids/",
            dataType: "json",
            async: false,
            success: function (data) {
                $.each(data, function (i, value) {
                    if (value.id == row.statusId) {
                        return value; // return string
                    }
                });
            }
        });
    }

0 个答案:

没有答案