I want to load the grid either or both the below ways:
1. On change (selected index changed) event of DropDownList. The selected value from dropdown should be passed to grid and based on it grid should display result.
2. On click of the button event. The selected value from dropdown should be passed to grid on button click and based on it grid should display result.
Do we have any kind of example which shows meets my above requirements or any kind of lead that I look into it will be very helpful.
4 Answers, 1 is accepted
This is a quote from my answer in the other thread.
In the current scenario, you should set the AutoBind option of the Grid to false to indicate the data should not be bound on page load and specify a Data function for the Read Action of the Grid's dataSource, which will return the additional data for the controller.
You should bind to the change event in the DropDownList configuration.
Finally in the change event handler, you should get the currently selected item and call the read action of the Grid's dataSource to bind the data.
The selected item from the DropDownList will be received as an additional parameter in the Read action of the Controller.
As a side note I would like to ask you to post your questions only once, so we could provide you the best possible assistance. I wish you a great day!
In the current scenario, you could use the one method to attach handler to be executed only a single time for the dataBound event and manually trigger the change event.
I wish you a great day!
Thank you for writing to us.
Both of these requirements are possible to achieve. Here are some implementations you can choose from:
2. Using .filter() method:
3. Filter widget:
Feel free to choose whichever solution you prefer.
Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.