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

PHP Wrappers: Grid->filter ?

1 Answer 37 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Paweł Kasztelan
Top achievements
Rank 2
Paweł Kasztelan asked on 22 Mar 2013, 01:33 PM
In 'normal' KendoUI there the following function, which allowed the use of certain filters while loading data into the table. How do I get the effect of initial conditions provide filtering to the table?
filter: {
    field: "",
    operator: "",
    value: ""
}
Unfortunately I have not found such a function in PHP wrappers.

1 Answer, 1 is accepted

Sort by
0
Accepted
Rosen
Telerik team
answered on 22 Mar 2013, 02:25 PM
Hi,

You can add initial filter expression via DataSource addFilterItem method. For example:

$dataSource = new \Kendo\Data\DataSource();
 
$filterItem = new \Kendo\Data\DataSourceFilterItem();
$filterItem->field('ProductName');
$filterItem->operator('eq');
$filterItem->value('Chai');
 
$dataSource->transport($transport)
           ->addFilterItem($filterItem);

Greetings,
Rosen
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
Grid
Asked by
Paweł Kasztelan
Top achievements
Rank 2
Answers by
Rosen
Telerik team
Share this question
or