This is a migrated thread and some comments may be shown as answers.

Editor With Grid Popup Using PHP Wrappers

2 Answers 51 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Burak
Top achievements
Rank 1
Burak asked on 19 Apr 2013, 03:32 PM
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 Answers, 1 is accepted

Sort by
0
Burak
Top achievements
Rank 1
answered on 19 Apr 2013, 04:13 PM
Use this project instead as I have include the sql query here.

Thank you.

Christian
0
Vladimir Iliev
Telerik team
answered on 23 Apr 2013, 12:40 PM
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!
Tags
Editor
Asked by
Burak
Top achievements
Rank 1
Answers by
Burak
Top achievements
Rank 1
Vladimir Iliev
Telerik team
Share this question
or