Editor With Grid Popup Using PHP Wrappers

3 posts, 0 answers
  1. Burak
    Burak avatar
    2 posts
    Member since:
    Apr 2012

    Posted 19 Apr 2013 Link to this post

    Hello Kendo UI Team,

    I am using the PHP wrappers trying to get an editor (http://demos.kendoui.com/web/editor/index.html) in a grid popup edit (http://demos.kendoui.com/web/grid/editing-popup.html). Now I want to be able using the PHP wrappers since I am a hard core PHP developer.

    I am getting this error in the console:
    Error: Invalid template:'$("#popup_editor").text()' Generated code:'var o,e=kendo.htmlEncode;with(data){o='$("';popup_editor").text();o+=;}return o;'

    I have enclosed my project below, could you please take a look and let me know how do I get editor in a grid popup edit to work.

    BTW I am using my supervisor's account at work and my name is Christian.

    Thank you.

    Christian
  2. Burak
    Burak avatar
    2 posts
    Member since:
    Apr 2012

    Posted 19 Apr 2013 Link to this post

    Use this project instead as I have include the sql query here.

    Thank you.

    Christian
  3. UI for ASP.NET AJAX banner
  4. Vladimir Iliev
    Admin
    Vladimir Iliev avatar
    2172 posts

    Posted 23 Apr 2013 Link to this post

    Hi Burak,

     
    From the provided information it seems that you are trying to define PopUp editor template incorrectly. I would suggest to create new instance of GridEditable class and use the templateId method to set the EditorTemplate ID:

    //create new instance of GridEditable
    $editable = new \Kendo\UI\GridEditable();
    //define the editorTemplate ID
    $editable -> templateId("popup_editor")
          -> mode("popup");
     
    $grid->addColumn($articleId, $doctorArticle, $command)
         ->dataSource($dataSource)
         ->addToolbarItem(new \Kendo\UI\GridToolbarItem('create'))  // adds create button
         ->height(430)
         //->editable('popup')
         //->editable($editor)
         //->tempk
         ->editable($editable)
         ->edit('function(e) {$("#editortextarea").kendoEditor();}')
         ->pageable(true);
     
    echo $grid->render();



    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!
Back to Top