Copy and Excel select all rows after 1,2,3,4 pagination. But not directly.

Copy and Excel select all rows after 1,2,3,4 pagination. But not directly.

csgjbeckcsgjbeck Posts: 8Questions: 2Answers: 1
edited June 2014 in Free community support

Table has 90 elements, 25 for page, 4 pages.

For Copy, Excel, etc:

If User presses Copy at start, 25 rows are copied.

If User press 1,2,3,4 to go through pages or Next then presses Copy 90 rows copied.

If User presses Last first, 40 rows copied.

What we want is for all 90 rows to be copied, regardless.

I've tried setting aButtons with this to no avail:

{sExtends: "copy",
mColumns: [1,2,3,4],
oSelectorOpts:
{ page: "all", order:"original", filter: "none"}
}

Answers

  • csgjbeckcsgjbeck Posts: 8Questions: 2Answers: 1
    edited June 2014

    Thought I would include this too:

            vm.baseTableOptions = {
                "aaSorting": [],
                "bDestroy": true,
                "aLengthMenu": [
                    [10, 25, 50, 100],
                    [10, 25, 50, 100]
                ],
                "iDisplayLength": 25,
                "bProcessing": true,
                "bDeferRender": true,
                "sPaginationType": "full_numbers",
    
                "sDom": 'T<"clear">lfriptip',
                "oLanguage": {
                    "sSearch": "Find:"
                },
                "oTableTools": {
                    "aButtons": [],
                    "sSwfPath": "swf/copy_csv_xls.swf"
                }
            };
    

    The buttons are added later, after security service figures out which ones to display.

  • csgjbeckcsgjbeck Posts: 8Questions: 2Answers: 1

    Ah! Many times when I present my question in this forum, the answer appears clearly.

    Apparently this setting:

    "bDeferRender": true,

    Affects the Copy Export feature with the aforementioned pagination issue. I've removed it and it's working as expected.

  • csgjbeckcsgjbeck Posts: 8Questions: 2Answers: 1

    Does anyone have an answer for this problem if bDeferRender is set to true?

    The deferred rendering interferes with the Export since pages are only loaded when they are viewed. If I have 100 rows with 25 per page, it only loads the first 25, therefore export to excel exports 25 rows.

    Any way we could force it to load all the pages upon Export?

This discussion has been closed.