简体   繁体   English

telerik radGrid自定义过滤器并导出到Excel文件

[英]telerik radGrid custom filter and exporting to excel file

In my case I use custom filter method. 就我而言,我使用自定义过滤器方法。 I have my own dropdowns and so on to choose appropriate data then I filter my dataSource call rebind and as a result I can see only filtered rows. 我有自己的下拉菜单,依此类推,以选择适当的数据,然后我重新绑定了dataSource调用,因此我只能看到已过滤的行。

That works fine. 很好

Here is the sample code: 这是示例代码:

 private void BindGrid()
    {
        var dataSource = AllOrdersReports;

        Grd.DataSource = dataSource;
        Grd.Rebind();
    }

The problem is that When I then push the button with code: 问题是当我然后按下代码按钮时:

Grd.MasterTableView.ExportToExcel();

All records are exported to excel despite the fact that right now there are only filtered records in the grid. 尽管现在网格中仅存在过滤的记录,但所有记录都导出到excel。

Any ideas why it behaves like that ? 有什么想法为什么会这样吗?

好了,问题解决了,我也实现了onDataSource需要事件处理程序...

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

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