Set datasource for in-row filters.

3 posts, 1 answers
  1. Caleb
    Caleb avatar
    6 posts
    Member since:
    Mar 2016

    Posted 01 May 2018 Link to this post

    Hello!

    I've been trying to see if there's a way to set the datasource for in-row filtering? I'm confused since I added the filtering successfully to the in-menu filtering but the in-row just ignores and uses the default grid's datasource to fetch all filter options. Here's an excerpt from a defined column in the grid:

    cols.Bound("JobNumber").Title("Job").Filterable(f => f.Multi(true).Search(true).DataSource(ds => ds.Read("JobNumbers", "Filter")));

    So the above totally works as expected using the in-menu filtering but the in-row ignores this. Anyway to achieve what I'm looking for? Thanks!

  2. Answer
    Stefan
    Admin
    Stefan avatar
    2913 posts

    Posted 03 May 2018 Link to this post

    Hello, Caleb,

    Thank you for the information.

    Could you please specify which is the referred in-row filter as in the provided code, the columns in using the MultiCheckBox filtering?

    If the in-row filter is the Grid row filtering, then the column.filterable.cell.dataSource property has to be used:

    https://docs.telerik.com/kendo-ui/api/javascript/ui/grid/configuration/columns.filterable.cell#columns.filterable.cell.dataSource

    https://docs.telerik.com/aspnet-mvc/api/Kendo.Mvc.UI.Fluent/GridBoundColumnFilterableBuilder#methods-DataSource(System.Action%3CKendo.Mvc.UI.Fluent.ReadOnlyDataSourceBuilder%3E)

    If the filter is different please let me know and I will gladly assist further.


    Regards,
    Stefan
    Progress Telerik
    Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
  3. Caleb
    Caleb avatar
    6 posts
    Member since:
    Mar 2016

    Posted 04 May 2018 in reply to Stefan Link to this post

    Hi Stefan!

    Thanks for the help. Such a small thing but I missed setting the filtering on the Cell itself. Here's the code that worked for me:

    cols.Bound("JobNumber").Title("Job").Filterable(f => f.Cell(c => c.DataSource(ds => ds.Read("JobNumbers", "Filter"))));

    Cheers!

Back to Top