Excel export isn't correct when column filtering is applied

7 posts, 0 answers
  1. James
    James avatar
    17 posts
    Member since:
    Sep 2014

    Posted 04 Sep Link to this post

    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.
  2. Stefan
    Admin
    Stefan avatar
    264 posts

    Posted 06 Sep Link to this post

    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.
     
  3. Kendo UI is VS 2017 Ready
  4. James
    James avatar
    17 posts
    Member since:
    Sep 2014

    Posted 09 Sep Link to this post

    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

  5. Stefan
    Admin
    Stefan avatar
    264 posts

    Posted 13 Sep Link to this post

    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.
     
  6. Burke
    Admin
    Burke avatar
    11 posts

    Posted 13 Sep Link to this post

    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.
     
  7. James
    James avatar
    17 posts
    Member since:
    Sep 2014

    Posted 14 Sep in reply to Burke Link to this post

    Burke,

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

  8. T. Tsonev
    Admin
    T. Tsonev avatar
    2770 posts

    Posted 17 Sep Link to this post

    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.
     
Back to Top
Kendo UI is VS 2017 Ready