Text area as an items.editor

3 posts, 1 answers
  1. Michael
    Michael avatar
    6 posts
    Member since:
    Feb 2019

    Posted 15 May Link to this post

    Can you use a textarea element as items.editor or make a TextBox multi-line
  2. Answer
    Dimitar
    Admin
    Dimitar avatar
    779 posts

    Posted 18 May Link to this post

    Hello Michael,

    Currently, rendering a textarea can be achieved through a custom editor function as follows:

    editor: function(container, options) {
      $("<textarea class='k-textarea' required name='" + options.field +  "' data-bind='value: " +  options.field + "'></textarea>")
        .appendTo(container);
    },

    Here is a Dojo example that demonstrates the above. Important to outline is that when custom editors are rendered, the validation attributes need to be manually added to the input element in order for the validation functionality to work as expected.

    In case you have any additional questions, please let me know.

    Regards,
    Dimitar
    Progress Telerik

    Progress is here for your business, like always. Read more about the measures we are taking to ensure business continuity and help fight the COVID-19 pandemic.
    Our thoughts here at Progress are with those affected by the outbreak.
  3. Michael
    Michael avatar
    6 posts
    Member since:
    Feb 2019

    Posted 18 May in reply to Dimitar Link to this post

    Thanks Dimitar, great help
Back to Top