kendo-labs / angular-kendo

A project to create a robust set of Angular.js bindings for Kendo UI widgets
474 stars 209 forks source link

Grid column editor template #381

Open rogerfar opened 10 years ago

rogerfar commented 10 years ago

When I create a kendo grid in regular JS I can specify my columns like this:

columns: [
    { field: "Employee", title: "Employee", editor: self.employeeDropDownEditor }
],

self.employeeDropDownEditor = function (container, options) {
    $('<input required data-bind="value:EmployeeId"/>')
        .appendTo(container)
        .kendoComboBox({
            autoBind: false,
            filter: "contains",
            suggest: true,
            serverFiltering: false,

            dataTextField: "FirstName",
            dataValueField: "UserId",
        });
};

How can I achieve the same thing but in Angular without having to initialize the combobox through jQuery? Would it be possible to assign a template to the editor that compiles?

RobHarrisAZ commented 9 years ago

I'm dealing with the exact same thing. Using the methods in the examples, I have to add this function that does DOM manipulation in my controller and of course, that breaks the separation that Angular provides.