Telerik Forums
UI for PHP Forum
4 answers
69 views
Hello,

I am using Telerik UI for PHP Grid component. And I want to use PHP function in column template, for ex.: 

#if (kendo.toString(kendo.parseDate(data.NearestTaskDate), "yyyy-MM-dd") === date(\'Y-m-d\')) {#
<div class="feed image">
<i class="#:NearestTaskTypeIcon# icon bg-yellow"></i>
</div>

where date is PHP function. However, browser console message says that date is not defined. How can fix it? Thank you.
Vishal
Top achievements
Rank 1
Iron
 answered on 27 Jul 2021
3 answers
44 views
just wondering if anyone has a solution to using the expand/collapsegroup events and detailexpand/collapse events to control multiple grids (both grids contain the same rows with the same columns with a unique identifier - ID - The two grids just show additional data). In other words if I open a group/detail on one grid the other grid opens closes.
Tsvetomir
Telerik team
 answered on 10 May 2021
1 answer
29 views
Is there a way to sync the scrolling of two vertical panes... If I scroll down in the left pane I want the right pane to scroll to the same top distance and vise versa..
Ivan Danchev
Telerik team
 answered on 05 May 2021
3 answers
271 views
Hi, i'm a newb in codeigniter and have a nice project and i want to use / purchase Kendo Ui, but is ther a tutorial, how a can add and use kendo ui in codeigniter ??

An MVC example would by nice.


Avdesh
Top achievements
Rank 1
 answered on 21 Apr 2021
1 answer
26 views
I looked in the documentation and samples but I didn't find, how to save the edited image on the server with PHP?
Martin
Telerik team
 answered on 14 Apr 2021
1 answer
25 views

hello,

i see in inline demo the read and write in server, in PHP demo is not exist but exist in JQuery demo

why the server code is not documented ?. (in JQuery demo)

thank you.

 

Ivan Danchev
Telerik team
 answered on 10 Mar 2021
1 answer
22 views

Hello,

i need add a button and my self code in toolbar it's possible ?

Thinkyou

Larbi
Top achievements
Rank 1
 answered on 08 Mar 2021
2 answers
22 views

HI 

  I use the official Remote Binding example,But with no results returned, I get an empty GRID. could you help me to check my code?  I'm sure there is no problem with JSON-Returning File Test02.php. It can return JSON results。

 
li
Top achievements
Rank 1
 answered on 03 Mar 2021
5 answers
535 views
This is not so much a question, but more tip for those looking to do the same.

I'm usiing Kendo + PHP Wrappers in various projects and for all my new projects I have started using composer as an easy way to reuse code and pull in external libraries. The only frustration I had was that I couldn't use this method to pull in the Kendo library.

So I decided to create my own little composer package, which is basically just a wrapper for the entire Kendo library. It contains both the PHP files and the js/css files.

For my most recent project I am using the Laravel 4 Framework (awesome, check it out: laravel.com), so my package is focused on Laravel, but really it should work for all frameworks (no laravel dependencies).

Since Kendo PHP is not open source, I could not simply create a github project and be done with it. Instead I set up a private Composer repository using Satis, using this tutorial: composer/satis tutorial

That was fairly straightforward and easy to do. To host the library, I created a private subversion repository on my private server (I'll be migrating everything to git once I have more time...) which contains the kendo js, css and php files.

The next step was to make sure that when I include the Kendo Composer package, the Composer Autoload function works as expected. To make that work, I had to add the following section to my composer.json file:
"autoload": {
    "classmap": [
        "src/Kendoui/lib"
    ]
}
This will ensure that whenever composer updates or installs, it scans the entire library folder and generates a classmap for autoloading. You won't have to manually include any more classes and when the Kendo library is updated, a simple composer update should do the trick for you.

I just thought I'd share this with everyone in case people are trying to do the same. If you would like to get a similar setup and run into issues, I'm more than happy to help! :)

Regards,
Rinck
Martin
Telerik team
 answered on 18 Aug 2020
2 answers
31 views

Hi,

I use kendo diagram. There is a problem about HierarchicalDataSource that does not make a request to API to update of itself.

There is an example of the code on the below;


$transport = new \Kendo\Data\DataSourceTransport();
 
$create = new \Kendo\Data\DataSourceTransportCreate();
 
$create->url('/Api/Json/Security/Create?_token='.csrf_token())
    ->contentType('application/json')
    ->dataType("JSONP")
    ->type('POST');
 
$read = new \Kendo\Data\DataSourceTransportRead();
 
$read->url('/Api/Json/Security/Read?_token='.csrf_token())
    ->contentType('application/json')
    ->dataType("JSONP")
    ->type('POST');
 
$update = new \Kendo\Data\DataSourceTransportUpdate();
 
$update->url('/Api/Json/Security/Update?_token='.csrf_token())
    ->contentType('application/json')
    ->dataType("JSONP")
    ->type('POST');
 
$destroy = new \Kendo\Data\DataSourceTransportDestroy();
 
$destroy->url('/Api/Json/Security/Delete?_token='.csrf_token())
    ->contentType('application/json')
    ->dataType("JSONP")
    ->type('POST');
 
$transport->create($create)
    ->read($read)
    ->update($update)
    ->destroy($destroy)
    ->parameterMap('function(data) {
      return kendo.stringify(data);
  }');
 
$model = new \Kendo\Data\HierarchicalDataSourceSchemaModel();
$model->id("Id")
    ->addField("Title")
    ->addField("Type")
    ->addField("ParentId")
    ->children("items");
 
$schema = new \Kendo\Data\HierarchicalDataSourceSchema();
$schema->model($model);
 
$dataSource = new \Kendo\Data\HierarchicalDataSource();
$dataSource->transport($transport)
    ->requestEnd('reDesign')
    ->batch(true)
    ->schema($schema);
 
$layout = new \Kendo\Dataviz\UI\DiagramLayout();
$layout->type('tree')
    ->subtype('down')
    ->horizontalSeparation(100)
    ->verticalSeparation(50);
 
 
$shapeContent = new \Kendo\Dataviz\UI\DiagramShapeDefaultsContent();
 
 
$shape_defaults = new \Kendo\Dataviz\UI\DiagramShapeDefaults();
$shape_defaults->visual(new \Kendo\JavaScriptFunction('visualTemplate'))
    ->content($shapeContent);
 
$stroke = new \Kendo\Dataviz\UI\DiagramConnectionDefaultsStroke();
$stroke->color('#586477')
    ->width(2);
 
$connection_defaults = new \Kendo\Dataviz\UI\DiagramConnectionDefaults();
$connection_defaults->stroke($stroke)
    ->selectable(false);
 
$diagram = new \Kendo\Dataviz\UI\Diagram('diagram');
$diagram->dataSource($dataSource)
    //->connectionsDataSource()
    ->layout($layout)
    ->editable(array("drag" => false, "resize" => false,
        "tools" => (array) array(
            array("name" => "createShape"),
            array("name" => "edit"),
            array("name" => "delete"),
            array("type" => "button", "text" => "Resim", "click" => new \Kendo\JavaScriptFunction('function(e) { exportImg() }')),
            array("type" => "button", "text" => "PDF", "click" => new \Kendo\JavaScriptFunction('function(e) { exportPdf() }')),
            array("type" => "button", "text" => "SVG", "click" => new \Kendo\JavaScriptFunction('function(e) { exportSvg() }')),
        ),
        "shapeTemplate" => new \Kendo\JavaScriptFunction('kendo.template(
                "<div class=\"k-edit-label\"><label>Başlık</label></div>" +
                "<div class=\"k-edit-field\"><input class=\"k-textbox\" type=\"text\" name = \"Title\" id=\"Title\"/></div>" +
                "<div class=\"k-edit-label\"><label>İş Grubu</label></div>" +
                "<div class=\"k-edit-field\"><input type=\"checkbox\" class=\"k-checkbox\" name = \"Type\" id=\"Type\"/></div>" +
                "<div class=\"k-edit-label\"><label>Bağlı Departman</label></div>" +
                "<div class=\"k-edit-field\"><input id=\"ParentId\" name = \"ParentId\"/></div>")')
    ))
    ->dataBound('onDataBound')
    ->shapeDefaults($shape_defaults)
    ->addEvent('dp')
    ->edit('dp')
    ->select('function(e) {
        $.each(e.selected, function($k, $v){
            if(typeof($v.type) == "function"){
                console.log($v);
            }
        });
         
    }')
    ->connectionDefaults($connection_defaults);
 
 
 
$render = $diagram->render();
 $results = array("Render" => $render);
 
return response()->JSON($results);
marksist
Top achievements
Rank 1
 answered on 17 Aug 2020
Top users last month
JG
Top achievements
Rank 2
Iron
ixen
Top achievements
Rank 1
Iron
Iron
Iron
Matthias
Top achievements
Rank 5
Bronze
Bronze
Iron
Roland
Top achievements
Rank 1
Veteran
Iron
SK
Top achievements
Rank 1
Iron