PHP Wrappers: Grid->filter ?

2 posts, 1 answers
  1. Paweł Kasztelan
    Paweł Kasztelan avatar
    17 posts
    Member since:
    Aug 2012

    Posted 22 Mar 2013 Link to this post

    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.
  2. Answer
    Rosen
    Admin
    Rosen avatar
    3235 posts

    Posted 22 Mar 2013 Link to this post

    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!
  3. UI for ASP.NET AJAX banner
Back to Top