0
votes

I want to add a button kendo grid edit popup mode ( kendo web asp.net mvc razor)

What I want to get

example : I have 2 table with relationship one(table A) -many (table B) now user click add new B, in pop-up edit have a drop-down show A, next to drop-down i want to add new button to add new A without navigate direct

1

1 Answers

0
votes

Define in your columns definition an editor function that generates both elements (the checkbox as it is being added and the button).

Example:

{
    field   : "selected",
    title   : "Selected",
    template: "<input type='checkbox' name='selected' #= selected ? 'checked' : '' # disabled/>",
    editor : generateButton
}

and generateButton is:

function generateButton(container, options) {
    container.append('<input type="checkbox" name="' + options.field + '" data-type="boolean" data-bind="checked:' + options.field + '"/>')
            .append('<a href="#" id="mybutton" class="k-button">Button</a>');
}

Example in JSFiddle here