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

Excel export isn't correct when column filtering is applied

6 Answers 260 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
James
Top achievements
Rank 1
James asked on 04 Sep 2016, 04:05 PM
I've noticed that when column filtering is applied to the grid that the Excel export number of rows is less than what is present on the grid after the column filtering.  It seems kind of random on what is missing.  Is this a known issue?   When I don't apply column filtering it exports the correct number of rows.

6 Answers, 1 is accepted

Sort by
0
Stefan
Telerik team
answered on 06 Sep 2016, 12:16 PM
Hello James,

This is not a known issue. I made a Dojo example, with filterable Grid and Excel export, which is working as expected:

http://dojo.telerik.com/AdAxe

If additional assistance is needed, please provide the following:

1) A fully runnable example that reproduces the issue.
2) Steps to reproduce the issue.
3) Used Kendo UI version and browser.

Thank you in advance.

Regards,
Stefan
Telerik by Progress
 
Get started with Kendo UI in days. Online training courses help you quickly implement components into your apps.
 
0
James
Top achievements
Rank 1
answered on 09 Sep 2016, 05:41 PM

A fully runnable example is impossible because its part of my greater app with backend services, etc..

But let me post my grid configuration along with the dataSource.  FYI, this is a React component and written in Typescript

01.export interface IKendoGridProps extends React.Props<any> {
02.    fieldTitles?: Array<IKendoGridFieldTitles>;
03.    filterParameters: {};
04.    model?: {};
05.    excelFileName?: string;
06.}
07. 
08.export interface IKendoGridFieldTitles {
09.    field: string;
10.    title: string;
11.    width: number;
12.    type: string;
13.    format: string;
14.}
15. 
16.export default class ReactGenericKendoGrid extends React.Component<IKendoGridProps, {}> {
17. 
18.    constructor(props) {
19.        super(props);
20.    }
21. 
22.    componentDidMount() {
23.        this.getGridReference().kendoGrid({
24.            dataSource: this.createDataSource() ,
25.            toolbar: ["excel"],
26.            excel: {
27.                allPages: true,
28.                fileName: `${this.props.excelFileName} ${new Date().toISOString()}.xlsx`
29.            },
30.            autoBind: true,
31.            scrollable: true,
32.            resizable: true,
33.            pageable: true,
34.            filterable: {
35.                mode: "row"
36.            },
37.            noRecords: {
38.                template: "No records found"
39.            },
40.            columns: this.props.fieldTitles
41.        });
42. 
43.    }
44. 
45. 
46.    componentDidUpdate(previousProps: IKendoGridProps, previousState: any) {
47.        let grid = this.getGridReference().data("kendoGrid");
48.        grid.dataSource.page(1);
49.    }
50. 
51. 
52.    render() {
53.        return (
54.            <div/>
55.        );
56.    }
57. 
58.    getGridReference() {
59.       return $(ReactDOM.findDOMNode(this));
60.    }
61. 
62.    createDataSource(): kendo.data.DataSource {
63.        const dataSource = new kendo.data.DataSource({
64.            transport: {
65.                read: {
66.                    url: `${window.ClinicianDesktop.applicationBaseUrl}Reporting/GetReportFromFilterOptions`,
67.                    dataType: "json",
68.                    data: () =>  this.props.filterParameters
69.                }
70.            },
71.            schema: {
72.                data: "Data", // the array of records
73.                total: "Total",
74.                model: this.props.model
75.            },
76.            serverPaging: true,
77.            pageSize: 50
78.        });
79. 
80.        return dataSource;
81.    }

 

Is there anything there that looks out of the ordinary?  The filters appear to be working correctly.  Notice that the grid columns, types are being generated dynamically.  The filtering itself appears to work correctly.   The export works great when no filtering has occurred.   Would something about paging, and the AJAX call itself have something to do with it since when I'm exporting, all pages are being exported.

Any help or direction on this would be greatly beneficial.

 

Thanks

0
Stefan
Telerik team
answered on 13 Sep 2016, 07:40 AM
Hello James,

In order to be able to locate the issue and assist you further, we will need a fully runnable isolated example.

This will ensure that the issue is caused by Kendo UI and not from additional custom code or third-party libraries and tools.

Thank you in advance.

Regards,
Stefan
Telerik by Progress
 
Get started with Kendo UI in days. Online training courses help you quickly implement components into your apps.
 
0
Burke
Telerik team
answered on 13 Sep 2016, 01:22 PM
Hello James!

Thank you for inquiring about Kendo UI and React. As of now, there is no official support for Kendo UI with React. As such, this ticket will be automatically closed.

However, if you can get your issue into a working Plunkr, JSBin, or JSFiddle feel free to contact me directly and we should be able to work through the issue.

If you are interested in React support for Kendo UI, please visit the issue on our Feature Request Portal and vote it up! You may also look into community GitHub repos such as the one from Cody Lindley where you can open issues.

Regards,
Burke
Telerik by Progress
 
Get started with Kendo UI in days. Online training courses help you quickly implement components into your apps.
 
0
James
Top achievements
Rank 1
answered on 15 Sep 2016, 02:52 AM

Burke,

There was no inquiry about Kendo UI and React.  The problem has nothing to do with React.

0
T. Tsonev
Telerik team
answered on 17 Sep 2016, 08:05 AM
Hello,

Acknowledged. Still, we're unable to assist if we can't replicate the issue locally.

Please, feel free to modify the Dojo sent earlier or send us a working sample that replicates the issue.

Apologies for the caused inconvenience.

Regards,
T. Tsonev
Telerik by Progress
 
Get started with Kendo UI in days. Online training courses help you quickly implement components into your apps.
 
Tags
General Discussions
Asked by
James
Top achievements
Rank 1
Answers by
Stefan
Telerik team
James
Top achievements
Rank 1
Burke
Telerik team
T. Tsonev
Telerik team
Share this question
or