如何使Kendo下拉选择始终在Kendo网格中可见

时间:2015-03-03 11:12:00

标签: select kendo-ui kendo-grid

我试图在Kendo网格中放一个简单的选择,但我没有运气。选择未显示。知道我需要做什么吗?

这是我的代码:

JS

 $(document).ready(function () {
        $("table").kendoGrid({
            autoBind: true,
            scrollable: false,
            sortable: false,
            selectable: false,
            filterable: false
        });
    });
 $(document).ready(function () {
     $('select').kendoDropDownList();

 });

HTML

<table style="min-height:400px;">
    <thead>
        <tr>
            <th>ALL Vaults</th>
            <th>
            </th>
        </tr>
    </thead>
    <tbody>
        <tr>
            <td>1</td>
            <td>
                <select>
                    <option>option 1</option>
                    <option>option 2</option>

                </select>
            </td>
        </tr>
        <tr>
            <td>2</td>
            <td>
                <select>
                    <option>option 1</option>
                    <option>option 2</option>

                </select>
            </td>
        </tr>
        <tr>
            <td>3</td>
            <td>
                <select>
                    <option>option 1</option>
                    <option>option 2</option>

                </select>
            </td>
        </tr>
    </tbody>
</table>

http://jsfiddle.net/rFDD6/458/

1 个答案:

答案 0 :(得分:0)

使用此配置无法达到您想要的效果。见demo

function DropDownEditor(container, options) {
    $('<select data-bind="value:' + options.field + '"><option>option 1</option><option>option 2</option></select>')
        .appendTo(container)
        .kendoDropDownList();
}