Grid Popup and templating

2 posts, 0 answers
  1. Alessio
    Alessio avatar
    9 posts
    Member since:
    Aug 2016

    Posted 08 Mar 2017 Link to this post

    Can someone help me with popup and templating,  i have this code, and can't work 


    $gridtemplate = new \Kendo\UI\GridEditable();

    $grid->addColumn($phonenumber, $category, $idmessage, $textdata, $imagedata, $orderDate, $command)
         ->addToolbarItem(new \Kendo\UI\GridToolbarItem('save'), new \Kendo\UI\GridToolbarItem('cancel'))

    echo $grid->render();

    <script id="grid-template" type="text/x-kendo-template">

    function mygrid()
        var template = kendo.template("<div id='box'>#= phonenumber #</div>");
        var result = template(data); //Pass the data to the compiled template
        console.log("phonenumber :"+phonenumber);
        console.log("result :"+result);
        $("#grid-template").html(result); //display the result



  2. Alex Hajigeorgieva
    Alex Hajigeorgieva avatar
    352 posts

    Posted 10 Mar 2017 Link to this post

    Hello Alessio,

    I have already responded to the support ticket on the same subject.

    We recommend choosing a single thread to handle related issues/questions for the most efficient resolution. I will paste my response here are well, however, I suggest if more assistance is needed to continue our conversation in the support ticket.

    It seems to me that defining the template as a function is not necessary since there is no custom logic to be executed in the function "mygrid". I would suggest testing the Kendo UI Grid with the template defined as below(note that in this case, the property is templateId as opposed to the template):


    Alternatively, if you were to use a function to render the template, the function should return the resulting string, i.e:

    function mygrid(){
     return kendo.template($("#popup_editor").html());

    Thank you for your understanding.

    Kind Regards,
    Alex Hajigeorgieva
    Telerik by Progress
    Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Back to Top