1. #31
    Sencha User
    Join Date
    Jul 2011
    Posts
    7
    Vote Rating
    0
    Ewoq is on a distinguished road

      0  

    Default


    I would like to help you with it wiznia, if you'd like?

  2. #32
    Sencha User
    Join Date
    Jun 2008
    Posts
    157
    Vote Rating
    0
    wiznia is on a distinguished road

      0  

    Default


    IE support would be nice, although I don't know how to tackle it, since there's no support for data uris (which are being used right now). Besides if we can get rid of the datauris, maybe we can optimize a little bit the plugin. Now, it is generating the file every time a load is made on the store, so even if you don't click the export button, the file is being generated...
    Apart from that I wasn't going to add mucho more functionality since the functionality provided works for me, so suggestions are welcome.

  3. #33
    Sencha User
    Join Date
    Jul 2011
    Posts
    6
    Vote Rating
    0
    nimda13 is on a distinguished road

      0  

    Default


    col.on is not a function col.on("show", setLink, me);
    Button...2614604 (line 51)
    Any idea?


    var exportButton = Ext.create('Ext.ux.exporter.Button', {
    component: Ext.getCmp('grid'),
    icon: '/odminko/extjs/examples/ux/exporter/page_white_excel.png',
    text : "Сохранить в Excel"
    });

    Or comment
    lines:
    // col.on("show", setLink, me);
    // col.on("hide", setLink, me);

  4. #34
    Sencha User
    Join Date
    Jul 2011
    Posts
    6
    Vote Rating
    0
    nimda13 is on a distinguished road

      0  

    Default


    I load the table with AJAX and eval() then processed.
    At first, everything works fine.
    But if I upload the same table again, unloads a blank file with the table name in the title.

    My Code (all in eval() after AJAX request):


    PHP Code:
    if (!Ext.ModelManager.isRegistered('ModelMyGrid<?php echo $service_id;?>')){  
        Ext.define('ModelMyGrid<?php echo $service_id;?>', {
                extend: 'Ext.data.Model',
                fields: [<?php echo $fields;?>],
                idProperty: '<?php echo $id;?>'
        });
    }

    // create the Data Store
    var gridstore = Ext.create('Ext.data.Store', {
            pageSize: 50,
            model: 'ModelMyGrid<?php echo $service_id;?>',
            autoLoad: true,
            autoSync: true,
            remoteSort: true,
            proxy: {
                type: 'ajax',
                //url: '/extadmin/get_data_for_store/<?php echo $service_id;?>/',
                api: {
                    read: '/extadmin/get_data_for_store/<?php echo $service_id;?>',
                    //create: 'app.php/users/create', создавать буду через форму
                    update: '/extadmin/fast_update_item/<?php echo $service_id;?>',
                    destroy: '/extadmin/delete_item/<?php echo $service_id;?>'
                },
                reader: {
                    type: 'json',
                    root: 'baseData',
                    totalProperty: 'totalCount'
                },
                writer: {
                    type: 'json',
                    writeAllFields: false, //передаются параметры только исправленных ячеек + ID
                    root: 'baseData' //массив, в котором закодированы данные
                }

            },
            sorters: [{
                property: '<?php echo $id;?>',
                direction: 'DESC'
            }],
            listeners: {
                write: function(gridstore, operation){
                    Ext.example.msg('Сохранено', 'Запись <b>' + record.getId() + '</b> сохранена');
                    gridstore.load();
                }
            }
    });

    var pluginExpanded = true;

    var rowEditing = Ext.create('Ext.grid.plugin.CellEditing', {
            clicksToEdit: 2
    });

    var filters = {
            ftype: 'filters',
             filters: [<?php echo $filters_data;?>]
    };

    var exportButton = Ext.create('Ext.ux.exporter.Button', {
            component: Ext.getCmp('grid'),
            icon: '/odminko/extjs/examples/ux/exporter/page_white_excel.png',
            text     : "Сохранить в Excel"
    });

    var grid = Ext.create('Ext.grid.Panel', {
        id: 'central_body<?php echo $service_id;?>', //обязательный идентификатор для виджета, который будет грузиться в центральную часть. уникальный для каждого сервиса
        title:'<?php echo $task_name;?>',
        store: gridstore,
        columnLines: true,
        multiSelect: true, //можно выделить несколько строк
        columns: [ <?php echo $columns_data;?>],
        autoExpandColumn: '<?php echo $id;?>',
        loadMask: true,
        features: [filters],
        plugins: [rowEditing],
        dockedItems: [{
                xtype: 'toolbar',
                items: [ exportButton]
                                });                          
                            }
                        }
                }]
            }],
        // paging bar on the bottom
        bbar: Ext.create('Ext.PagingToolbar', {
           store: gridstore,
           displayInfo: true,
           displayMsg: 'Записи {0} - {1}. Всего {2}',
           emptyMsg: "Нет записей"
        })
    });

    gridstore.loadPage(1);

  5. #35
    Sencha User
    Join Date
    Mar 2011
    Posts
    208
    Vote Rating
    0
    bee is on a distinguished road

      0  

    Default


    @winzia,

    I am facing below error 3487
    Uncaught TypeError: Cannot call method 'substring' of undefined
    I specified all what you mentioned. please help me

  6. #36
    Sencha User
    Join Date
    Jun 2008
    Posts
    157
    Vote Rating
    0
    wiznia is on a distinguished road

      0  

    Default


    @bee, when are you getting this error? When loading the data in the store? When you click the button?
    Also, what is that error 3487? Is it the line number? In which file? Do you have the stacktrace?

  7. #37
    Sencha User
    Join Date
    Sep 2011
    Posts
    3
    Vote Rating
    0
    clarkbanks is on a distinguished road

      0  

    Default


    Is there anyway to specify the name of the xls file being downloaded? In chrome it just downloads a file called 'download' which has to be renamed with an '.xls' extension to work.

  8. #38
    Sencha User
    Join Date
    Jun 2008
    Posts
    157
    Vote Rating
    0
    wiznia is on a distinguished road

      0  

    Default


    Right now there's not a way of specifying the name of the file, I don't know if this is possible since it's a data uri. I think you need flash in order to do that, I found this library https://github.com/dcneiner/Downloadify that uses a flash component to serve the file. It would solve the IE incompatibility and add some nice features like choosing the name and events on download. It should't be difficult to integrate it with the exporter button. Right now I don't have time to do it, but you can fork my project and then add a pull request.

  9. #39
    Sencha User
    Join Date
    Mar 2011
    Posts
    208
    Vote Rating
    0
    bee is on a distinguished road

      0  

    Default


    I got this error when loading my grid itself. That line no is of debug file I guess. Even I am not sure about this.

  10. #40
    Sencha User
    Join Date
    Jun 2008
    Posts
    157
    Vote Rating
    0
    wiznia is on a distinguished road

      0  

    Default


    mmm, you'll have to do a little debugging by yourself and give me more info if you want some help...
    Or post a complete example that fails.

Thread Participants: 115

  1. dawesi (1 Post)
  2. feiji1983 (1 Post)
  3. isaac (1 Post)
  4. radtad (4 Posts)
  5. austin1030 (1 Post)
  6. pavanextjs (5 Posts)
  7. aragm (1 Post)
  8. terjeio (1 Post)
  9. il Sergio (2 Posts)
  10. edspencer (1 Post)
  11. nitingautam (2 Posts)
  12. edykstra (3 Posts)
  13. kalchas (4 Posts)
  14. pardha (1 Post)
  15. shelly (1 Post)
  16. talha06 (3 Posts)
  17. vaucer (1 Post)
  18. SMMJ_Dev (7 Posts)
  19. Ekambos (1 Post)
  20. vispiron (1 Post)
  21. sdruckerfig (4 Posts)
  22. jwcraig (1 Post)
  23. dbrin (1 Post)
  24. scaddenp (2 Posts)
  25. grisevich (1 Post)
  26. semialcruz (3 Posts)
  27. krishnarn1 (1 Post)
  28. mikih (1 Post)
  29. Teemac (3 Posts)
  30. jpcoppol (1 Post)
  31. ssuarez (4 Posts)
  32. trinitrotoluen (1 Post)
  33. aladdina (1 Post)
  34. Mental (3 Posts)
  35. nuskin (5 Posts)
  36. droessner (5 Posts)
  37. HIG (1 Post)
  38. jjerome (4 Posts)
  39. bee (2 Posts)
  40. RAD001 (8 Posts)
  41. RNL (1 Post)
  42. shawon (4 Posts)
  43. parkcity (4 Posts)
  44. carlosgoias (1 Post)
  45. Ewoq (7 Posts)
  46. skotamreddy (1 Post)
  47. another_i (5 Posts)
  48. neerajbherwal (1 Post)
  49. nimda13 (2 Posts)
  50. acteon (2 Posts)
  51. ma1986 (2 Posts)
  52. pierrocknroll (1 Post)
  53. Aranair (7 Posts)
  54. clarkbanks (1 Post)
  55. linyajun (1 Post)
  56. delusion (2 Posts)
  57. Jay Tanwar (2 Posts)
  58. supermarcos (6 Posts)
  59. mmuzamil (1 Post)
  60. amishra06 (1 Post)
  61. hundare (1 Post)
  62. Ecthelion (1 Post)
  63. balajivaikar (2 Posts)
  64. jarobi (1 Post)
  65. ferchotipin (2 Posts)
  66. sebas2515 (3 Posts)
  67. arpeggian (3 Posts)
  68. a_kanin (1 Post)
  69. MeDigital (1 Post)
  70. Vasanthoo7 (3 Posts)
  71. jeora (1 Post)
  72. BlackLine (1 Post)
  73. mrhomer (7 Posts)
  74. KostasP (2 Posts)
  75. rdominelli (4 Posts)
  76. pksiv (1 Post)
  77. yoisen (2 Posts)
  78. opms (1 Post)
  79. Oxii (1 Post)
  80. sarz (6 Posts)
  81. gabsoftware (3 Posts)
  82. 9josh (1 Post)
  83. ananthk (2 Posts)
  84. psnprasad (1 Post)
  85. alex9311 (2 Posts)
  86. felix822 (2 Posts)
  87. mpasacrita@escholar.com (1 Post)
  88. Garry Hawkins (1 Post)
  89. jesus.balles (1 Post)
  90. chandrima31 (1 Post)
  91. this-is-sparta (1 Post)
  92. vitalz (7 Posts)
  93. Sheng_Yunzhou (2 Posts)
  94. xdengli (1 Post)
  95. sgscontact (1 Post)
  96. nitingogia@gmail.com (1 Post)
  97. Swetosuvro (1 Post)
  98. sudrak (1 Post)
  99. cdmein (1 Post)
  100. code4jhon (1 Post)
  101. felixfang (2 Posts)
  102. jayasingh1802 (2 Posts)
  103. abdul haq (3 Posts)
  104. luatbravo (1 Post)
  105. gilmaredo@gmail.com (1 Post)
  106. ricardo.lourival (1 Post)
  107. Sundarganesh Ramar (1 Post)
  108. madhavan281981 (1 Post)
  109. suvo (3 Posts)
  110. shankar8rajah1 (1 Post)
  111. benny_GI (1 Post)
  112. cojocarutudor (1 Post)
  113. arnoldvillasanta (4 Posts)
  114. tajashwin (1 Post)
  115. mangeshppatil (2 Posts)