简体   繁体   English

如何在按下按钮时从多个MVC3 Telerik控件中获取值并过滤屏幕上的其他控件?

[英]how I get values from several MVC3 Telerik Controls on a button press and filter other controls on the screen?

I have a couple of Telerik DropDownList controls and a RangeSlider that I want to set values on then have a button which applies this to another set of controls (filtering data down) 我有几个Telerik DropDownList控件和一个RangeSlider,我想在上面设置值,然后有一个按钮将其应用于另一组控件(向下过滤数据)

How do I get the values of the 3 different controls and apply it to say Charts? 如何获取3个不同控件的值并将其应用于“图表”?

Is the only way to do it with Client Side API and javascript? 使用客户端API和JavaScript的唯一方法是吗? or can I pull it somehow with the model? 还是可以用模型将其拉出?

I tried doing a HTTP Post and the model returned to the Action was all null. 我尝试执行HTTP Post,并且返回给Action的模型都为空。

You will need to use JavaScript for sure. 您肯定需要使用JavaScript。 When the button is clicked you will need to use the rebind method of the Chart object (check here how to use it properly http://www.telerik.com/help/aspnet-mvc/telerik-ui-components-chart-client-api-and-events.html ) to send your values to the server and rebind the Chart 单击该按钮后,您将需要使用Chart对象的rebind方法(在此处检查如何正确使用它) http://www.telerik.com/help/aspnet-mvc/telerik-ui-components-chart-client -api-and-events.html )将您的值发送到服务器并重新绑定图表

Also you will need to use the client side methods of the DropDowns and the Slider - to get the values. 另外,您将需要使用DropDownsSlider的客户端方法-来获取值。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM