[OPEN] [#1353] [4.1.0] grid.print() not working with filter header plugin ?

  1. #1

    [OPEN] [#1353] [4.1.0] grid.print() not working with filter header plugin ?

    Hi, To reproduce, using your demo https://examples4.ext.net/#/GridPanel/ArrayGrid/Simple/ (I use the MVC version though)
    The demo prints OK, after add .Plugins(Html.X().FilterHeader()) to the grid, it prints a blank page.
    Any idea?

    P.S I am using MVC5 on VS2015

    Thanks
    -susan zhang
  2. #2
    Hello Susan Zhang!

    Thanks! We have been able to reproduce the issue here!

    We had this once logged as issue #514 which has been fixed. But this looks like the problem might have just been introduced again after the so many technology changes on the panel from 2.x to now.

    Now, logged as #1353 with mention to the above mentioned issue.
    Fabrício Murta
    Developer & Support Expert
  3. #3
    Hi Fabricio, Thanks for the info! When do you think these issues (#1353, #1352) can be fixed ? If it can take more than a month, Is there any work around or temp fixes for it ?

    Thanks
    -szhang
  4. #4
    Hello Susan Zhang!

    This might help make it work, assuming you can print correctly without the filters:

    <script type="text/javascript">
        Ext.net.GridPrinter.filterColumns = function (columns, isGrouped, groupField, config) {
            var temp = [],
                i,
                len,
                result,
                c,
                includeHidden = this.get("includeHidden", config),
                includeGroupField = this.get("includeGroupField", config),
                columnFilter = this.get("columnFilter", config),
                columnFilterScope = this.get("columnFilterScope", config);
    
            for (i = 0, len = columns.length; i < len; i++) {
                c = columns[i];
    
                if (columnFilter) {
                    result = columnFilter.call(columnFilterScope, c);
                    if (Ext.isDefined(result)) {
                        if (result === true) {
                            temp.push(c);
                        }
                        continue;
                    }
                }
    
                if (c.isXType("container")) {
                    c = c.up();
                }
    
                if (c.isXType("commandcolumn") ||
                    c.isXType("componentcolumn") ||
                    c.isXType("imagecommandcolumn") ||
                    c.isXType("actioncolumn")) {
                    continue;
                }
    
                if (c.dataIndex &&
                    (!c.hidden || includeHidden) &&
                    (!isGrouped || c.dataIndex !== groupField || includeGroupField)) {
                    temp.push(c);
                }
                else if (c.isXType("templatecolumn")) {
                    temp.push(c);
                }
                else if (c.isXType("rownumberer")) {
                    c.text = "â„–";
                    temp.push(c);
                }
            }
            return temp;
        };
    </script>
    Hope this helps!
    Fabrício Murta
    Developer & Support Expert
  5. #5
    Great, Thank you! It works.
    -szhang

Similar Threads

  1. [CLOSED] [#504] Custom Field for Filter Header not working
    By iansriley in forum 2.x Legacy Premium Help
    Replies: 2
    Last Post: Jun 09, 2014, 10:11 AM
  2. Replies: 4
    Last Post: Apr 24, 2013, 6:35 AM
  3. Replies: 9
    Last Post: Mar 12, 2013, 11:10 PM
  4. filter above grid header
    By rnachman in forum 1.x Help
    Replies: 1
    Last Post: Feb 08, 2011, 9:01 PM
  5. [CLOSED] Boolean translation of Grid Filter Plugin
    By macap in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Jul 21, 2010, 9:28 AM

Posting Permissions