Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
15
WEBDATAGRID EXPORT TO EXCEL WORKING FINE AFTER FILTERING FOR STRING COLUMNS BUT NOT FOR DATE TIME COLUMNS
posted

I am exporting the filtered data of webdatagrid. It is working fine for string columns but for datetime columns suppose if filtering on this month the ui is showing correct filtered data but while exporting to excel it is showing current month data suppose sep of all the years and not only 2018.

  • 10685
    Offline posted

    Hello Jatin,

    Welcome to our community!

    Can you please add some more details to the exact scenario?

    What is the filtering implementation you are using? It will help in case you can either attach a isolated code sample reproducing the issue or at least the date time columns setup, data source and the exporting itself in code.

    Thank you for the feedback!

  • 10685
    Offline posted

    Hello again!

    While investigating this matter, I have created a code sample containing a DateTime column and editor provider for this column, in order to be able to have flawless filtering behavior. I have used 18.1.20181.23 for testing. As it may differ from your version, I am attaching the sample so you can test this on your side and version as well. The result from this testing is that the exported data is the same as the filtered by month data from the grid.

    Without further ado, here are the results when running the sample:

    1. When filter WDG Col4( the one containing the dates) to show This Month, the dates are filtered correctly.
    2. Click Export to Excel.
    3. Open the exported file and observe.
    4. Only current month data is exported and there are no other records ( like for example the same month next year).

    PS: If interested. you can check exporting to word and PDF as well, in point 2.

     

    I suggest you to test this sample on your side as well. In case your implementation differs, you may need to update it using an editor provider for example or else.

    In any case, please let me know what are the results on your side as well as if there is a different behavior in a specific version you are using.


    ExportDateTime_Excel_Word_PDF.zip