개발/기타

Kendo grid에서 Textarea Editor를

xwing 2014. 5. 14. 10:07

Kendo grid에서 Textarea Editor를 사용해 보자


kendo grid 기본 텍스트에디터는 Textbox 다.  이때 Textarea 가 필요할때가 있는데

editor를 생성해보자


// 컬럼 설정

{

    field: "Comment",

    title: "비고<br/>(textarea)",

    width: 140,

    filterable: false,

    editor: textareaEditor

} 


// textarea를 생성해줄 editor 함수

function textareaEditor(container, options) {

    $('<textarea name="' + options.field + '" style="width: ' + container.width() + 'px;height:' + container.height() + 'px" />')

    .appendTo(container);

};


이렇게 설정하면 Textarea 에디터를 사용할 수 있다.