How to set value to Editor with jQuery

2 posts, 1 answers
  1. Cooper
    Cooper avatar
    19 posts
    Member since:
    Mar 2014

    Posted 16 Sep 2014 Link to this post

    Hi telerik Members:

    step1:  I had added    @(Html.Kendo().Editor().name("editor") in view

    step2:  I want to set value to editor,  but   $("#editor").val("XXX")  is not work.

    step3:  I had found the paper :, 
                var editor = $("#editor").data("kendoEditor");

               But It is not work too.

    Is there some way can set value to editor?    

    thank you. 

    CUID : QD1612651

  2. Answer
    Dimiter Madjarov
    Dimiter Madjarov avatar
    2213 posts

    Posted 16 Sep 2014 Link to this post

    Hello Cooper,

    Indeed the correct way to set the value of the widget is to retrieve it's instance and use the value() method. Make sure that you are executing the code after the widget is initialized. If the problem is still persisting please send us an example, in which it is reproducing (the cshtml file) so we could assist further.

    Dimiter Madjarov

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

Back to Top