multiline textarea in a grid, databinding

4 posts, 0 answers
  1. Jan Houwen
    Jan Houwen avatar
    5 posts
    Member since:
    Aug 2004

    Posted 14 Mar 2013 Link to this post

    I want to include a multiline textarea in a grid. I've tried to do that like this sample, by adding an 'editor' property to a  kendoGrid columns field, and defining an initializer function.

    columns: [
           field: "cont"
           editor: textEditorInitialize 

    var textEditorInitialize = function(container, options) {
            $('<textarea style="width: ' + container.width() + 'px;height:' + container.height() + 'px" />')

    The editor does not quite work as expected. A functional edit box is added to the grid, but in edit mode the field value is not bound, the edit box is empty.
    After completing the edit, no change event is triggered, so the update method of the datasource is not invoked.

    What could be wrong?
  2. Vladimir Iliev
    Vladimir Iliev avatar
    2190 posts

    Posted 18 Mar 2013 Link to this post

    Hi Jan,

    Basically current approach is valid, however to be able to bind the editor to the model you should include the name attribute which should contain the field name - please check the updated editor below:

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

    Kind Regards,
    Vladimir Iliev
    the Telerik team
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  3. Shoeb
    Shoeb   avatar
    7 posts
    Member since:
    Feb 2015

    Posted 25 Jul 2016 Link to this post


    I want to implement the same in MVC grid. I am not sure how to use textEditorInitialize in MVC Kendo Grid.

    I have already implemented as per the below post.








  4. Vladimir Iliev
    Vladimir Iliev avatar
    2190 posts

    Posted 26 Jul 2016 Link to this post

    Hi Shoeb,

    Please note that the Editor MVC wrapper can be used as custom editor for given field as any other wrapper - for more information on the matter you can check the following help article:

    Vladimir Iliev
    Telerik by Progress
    Get started with Kendo UI in days. Online training courses help you quickly implement components into your apps.
Back to Top