I am looking for an example similar to this demo:
https://demos.telerik.com/kendo-ui/pdf-export/page-layout
However when there are more table rows I need a separate page.
I can get the pdf output working correctly (including page headers and footers), but the on-screen content does not match.
a) no second page on the screen (either to scroll or via pagination controls)
b) the page header/footer from the template I used in the drawDOM options are not on the screen
Any ideas how to do this?
thank you!
I have a grid with filterable mode: "menu,row". If I filter the dates by equal; not equal; >; <= it doesn't work. All my date are set to dd.mm.yyyy but when I look to my console.log filter value is not set correctly (see code bellow). How can Have the correct format, without time?
filter: function(e) { if (e.filter == null) { console.log("filter has been cleared"); } else { console.log(e.filter.logic); console.log(e.filter.filters[0].field); console.log(e.filter.filters[0].operator); console.log(e.filter.filters[0].value); }},
Answer:
anddateReleveeqWed May 08 2019 00:00:00 GMT+0200 (heure d’été d’Europe centrale)
My code to create column
function createColumn(columnNames,lang){ return columnNames.map(function(value){ var hasTemplate = value.template !== null; var isHidden = value.hidden == 1; var typeDate = value.type == "date"; var isLink = value.type == "link"; var hasAttributeClass = value.class_css !== null; return { field: value.field, title: value.title, format: typeDate ? "{0:dd.MM.yyyy}" : "", filterable: typeDate ? { cell: { operator: 'contains', showOperators: false, template: function(args) { args.element.kendoDatePicker({ culture: lang, format: "dd.MM.yyyy", parseFormat: "dd.MM.yyyy" }); } }, ui:function(element){ element.kendoDatePicker({ culture: lang, format:'dd.MM.yyyy', parseFormat: "dd.MM.yyyy" }) } } : { cell: { operator: 'contains', showOperators: false} } });}
M< code to create model
function createModel(columnNames){ var model = {}; var fields = {}; $.each(columnNames, function(index,value){ var propType = value.type; if (propType === "number" ) { fields[value.field] = { type: "number" }; } else if (propType === "boolean") { fields[value.field] = { type: "boolean" }; } else if (propType === "date") { //fields[value.field] = kendo.parseDate(value.field, "dd.MM.yyyy"); fields[value.field] = { type: "date", format: "{0:dd.MM.yyyy}" }; } else { fields[value.field] = { type: "string" }; } }); model.fields = fields; return model;}
This code, give me that :
filter: function(e) { if (e.filter == null) { console.log("filter has been cleared"); } else { console.log(e.filter.logic); console.log(e.filter.filters[0].field); console.log(e.filter.filters[0].operator); console.log(e.filter.filters[0].value); }},anddateReleveeqWed May 08 2019 00:00:00 GMT+0200 (heure d’été d’Europe centrale)
How can Have the correct format, without time?
Thank you for your help

I've been trying to use the PHP wrapper for UI and get the grid to display my JSON data. If I set $dataSource->data($json) where $json is the result from my call it works, but when I set it to $dataSource->transport($transport) where $transport contains my read transport I get no rows to display in the grid.
I'm using the CodeIgniter framework and have the require statements as part of my autoload, so they are there along with the requirements in the header.
Here is my code:
<?php
//$json = json_decode(file_get_contents(site_url('data/sys_settings/read')),true);
$transport = new \Kendo\Data\DataSourceTransport();
$create = new \Kendo\Data\DataSourceTransportCreate();
$create->url(site_url('data/sys_settings/create'))
->contentType('application/json')
->type('POST');
$read = new \Kendo\Data\DataSourceTransportRead();
$read->url(site_url('data/sys_settings/read'));
$update = new \Kendo\Data\DataSourceTransportUpdate();
$update->url(site_url('data/sys_settings/update'))
->contentType('application/json')
->type('POST');
$destroy = new \Kendo\Data\DataSourceTransportDestroy();
$destroy->url(site_url('data/sys_settings/destroy'))
->contentType('application/json')
->type('POST');
$transport->read($read)
->parameterMap(new \Kendo\JavaScriptFunction('function(data) {
return kendo.stringify(data)
}'));
$idField = new \Kendo\Data\DataSourceSchemaModelField('id');
$idField->type('number')
->editable(false)
->nullable(false);
$repId = new \Kendo\Data\DataSourceSchemaModelField('rep_id');
$repId->type('number')
->editable(false)
->nullable(false);
$col1Field = new \Kendo\Data\DataSourceSchemaModelField('key');
$col1Field->type('string')
->editable(false)
->nullable(false);
$col2Field = new \Kendo\Data\DataSourceSchemaModelField('val');
$col2Field->type('string')
->editable(true)
->nullable(true);
$model = new \Kendo\Data\DataSourceSchemaModel();
$model->addField($idField)
->addField($repId)
->addField($col1Field)
->addField($col2Field);
$schema = new \Kendo\Data\DataSourceSchema();
$schema->data('data')
->errors('errors')
->model($model)
->total('total');
$dataSource = new \Kendo\Data\DataSource();
$dataSource->transport($transport)
->pageSize(20)
->serverFiltering(true)
->type('odata')
->schema($schema);
$col1 = new \Kendo\UI\GridColumn();
$col1->field('key')
->width(120)
->title('Settings');
$col2 = new \Kendo\UI\GridColumn();
$col2->field('val')
->width(120)
->title('Value');
$command = new \Kendo\UI\GridColumn();
$command->addCommandItem('edit')
->addCommandItem('destroy')
->title(' ')
->width(250);
$grid = new \Kendo\UI\Grid('grid');
$grid->addColumn($col1,$col2,$command)
->dataSource($dataSource)
->addToolbarItem(new \Kendo\UI\GridToolbarItem('create'))
->editable('inline')
->sortable(true);
echo $grid->render();
here is my JSON being sent from the URL:
{"data":[{"id":"1","rep_id":"0","key":"default_country","val":"USA"},{"id":"2","rep_id":"0","key":"default_state","val":"CA"},{"id":"4","rep_id":"0","key":"default_account_type","val":"Customer"},{"id":"5","rep_id":"0","key":"default_title","val":null}],"total":4,"errors":null}
I'm not sure what I'm doing wrong, but I can't get it to work via the transport. Any help would be greatly appreciated.



See attached image.
I am using a "contains" filter. It works, but it also incorrectly shows this message "NO DATA FOUND." when there is matching data.
