Column filters

2 posts, 0 answers
  1. Emil
    Emil avatar
    30 posts
    Member since:
    Mar 2016

    Posted 24 Aug Link to this post

    I have a fully working grid that I can filter per. column , that is you can filter by each column with say "contains" text.

    Im wondering if there is a way for me to initialize that with path variables. f.e.

     

    http://localhost:54000/home/index?title=something&name=othername 

     

    and then the filter in the title column would have its filter text = "something" and the column name would have the filter text = "othername" etc.

     

    I have a few columns.

     

    Any ideas on how to do this ?

    I have a index action in home controller that can reiceive these filter strings, but I dont know how to "set" them in the grid.

    I could possibly send them into the view in the viewbag.

     

    Regards,

    Emil

     

  2. Stefan
    Admin
    Stefan avatar
    270 posts

    Posted 26 Aug Link to this post

    Hello Emil,

    Depending if the MVC wrappers are used or not, there are two possible approaches:

    1) Using MVC wrappers- The Grid will automatically apply the state values if they are in the correct format. Please check the following thread in our forum:

    http://www.telerik.com/forums/passing-default-filter-sort-and-group-values-to-a-grid-via-querystring-url-paramaters

    2) Using the vanilla HTML/JS Kendo UI widgets - Check how to parse the query string parameters into filter rules (e.g. JavaScript objects). This can be done either on the server or on the client:

    http://www.telerik.com/forums/filter-kendo-grid-from-query-string-parameters

    http://docs.telerik.com/kendo-ui/api/javascript/data/datasource#configuration-filter

    I hope this is helpful.

    Regards,
    Stefan
    Telerik by Progress
     
    Get started with Kendo UI in days. Online training courses help you quickly implement components into your apps.
     
  3. Kendo UI is VS 2017 Ready
Back to Top