简体   繁体   English

如何从剑道网格获取过滤值?

[英]How to get filtered value from kendo grid?

My question is how can I fetch filtered value to use it for further operation? 我的问题是如何获取过滤后的值以将其用于进一步的操作? and also how can I use footertemplate value? 还有如何使用footertemplate值? I searched at many forums and telerik method option also but not getting what i want. 我也在许多论坛和telerik方法选项中进行了搜索,但没有得到我想要的。 Please help me if anyone know answer 如果有人知道答案,请帮助我

Thanks! 谢谢!

I tried this: 我尝试了这个:

var dataSource =  $("#report").data("kendoGrid").dataSource; 

 var filteredDataSource = new kendo.data.DataSource({ 
     data: dataSource.data(), 
     filter: dataSource.filter() 
 }); 

filteredDataSource.read();

var data = filteredDataSource.view();

I have created a fiddle for you to check out. 我创建了一个小提琴供您查看。 It appears that your code does indeed return the filtered data on clicking "Run" below the grid and looking at the console window. 通过单击网格下方的“运行”并查看控制台窗口,您的代码确实确实返回了过滤后的数据。 So, it is not clear what you are having trouble with. 因此,不清楚您遇到了什么问题。 Do you have any browser console errors? 您是否有浏览器控制台错误?

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

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