Using filter in data-bind of kendoGrid

2 posts, 0 answers
  1. J
    J avatar
    143 posts
    Member since:
    Jun 2006

    Posted 21 Apr 2014 Link to this post

    I have the following values in my in my razor div tag:



    <div class="countdownKendoGrid" data-bind="kendoGrid: { data: $parent.RandomList, rowTemplate: ​'rl-row-template',​columns: [{ field: 'COL1', title: 'COL1', width: '50%' }, { field: 'COL2', title: 'COL2', width: '50%' }], filter: [{ field: ​'COL1', operator: 'eq', value: 'AB1234' }]}​"></div>

    My questions, since I'm rather new at this, are:
    1). Why would just the row where COL1 equals to AB1234 not be the only one that appears?
    2).  could I substitute "value: 'AB1234'" to be a property in my ViewModel?  ie: value: $parent.MyBindableValue





  2. Alexander Valchev
    Alexander Valchev avatar
    2895 posts

    Posted 23 Apr 2014 Link to this post


    Regarding your questions:

    1. The filter expression should be set at dataSource level. Filter property is part of the DataSource object, not the Grid itself.
    2. It looks like that you are using kendo-knockout. Is my assumption correct? The Knockout-Kendo library is part of the Kendo UI Labs projects. As such, these projects are not officially supported by the Kendo UI team. Any support requests (via tickets or Forum posts) should go to either StackOverflow, or to the Issues list for that project.

    Alexander Valchev
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Back to Top