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

Column filters

1 Answer 46 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Emil
Top achievements
Rank 1
Emil asked on 24 Aug 2016, 01:39 PM

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

 

1 Answer, 1 is accepted

Sort by
0
Konstantin Dikov
Telerik team
answered on 26 Aug 2016, 08:27 AM
Hi Emil,

You can set the AutoBind of the Grid to "false", retrieve the query string when the page loads and trigger the filtering through the DataSource of the Grid through its filter method. For your convenience, following is a dojo example demonstrating the implementation:
Setting the AutoBind to "false" will prevent the initial binding (without the filters), but if you have enabled the client-side operations, you could keep it to "true".

Hope this helps.


Regards,
Konstantin Dikov
Telerik by Progress
 
Get started with Kendo UI in days. Online training courses help you quickly implement components into your apps.
 
Tags
Grid
Asked by
Emil
Top achievements
Rank 1
Answers by
Konstantin Dikov
Telerik team
Share this question
or