jQWidgets Forums

jQuery UI Widgets Forums Grid export – grid -error

Tagged: , ,

This topic contains 4 replies, has 2 voices, and was last updated by  rajesh gupta 6 years, 3 months ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
  • export – grid -error #103680

    rajesh gupta
    Participant

    I am trying to do the export of grid to excel.
    I am using the following code to the export

    
     excelBtnOnClick() {
        console.log('excelBtnOnClick()');
        this.myGrid.exportdata('xls', 'jqxGrid');
      }
    

    I got the following error. what is is ‘getexportcolumntype’ means in the below error.

    
    ReportEngineComponent.html:70 ERROR TypeError: Cannot read property 'indexOf' of null
        at c.(:8888/reportMgr/anonymous function)._getexportcolumntype (http://localhost:8888/gainangular/app-image-upload-image-upload-module~app-…s-module~app-my-data-my-data-module~app-predef-cust~3c0da948.js:33931:7668)
        at c.<anonymous> (jqxgrid.export.js:8)
        at Function.each (jqxcore.js:8)
        at c.(:8888/reportMgr/anonymous function).exportdata (http://localhost:8888/gainangular/app-image-upload-image-upload-module~app-…s-module~app-my-data-my-data-module~app-predef-cust~3c0da948.js:33931:1551)
    
    export – grid -error #103681

    rajesh gupta
    Participant

    My template is as follows

    
        <jqxGrid #myGrid [width]="gridWidth" [autoheight]="true" style="margin-top:10px" [source]="gridDataSource" [columns]="gridColumns"
          [showaggregates]="true" [showstatusbar]="true" (click)="onGridClick()" [class.cursor-pointer]="showCursorPointer" [enablehover]="false"
          [sortable]="true" [filterable]="true" [autorowheight]="true" [autoheight]="true">
        </jqxGrid>
    
    
    export – grid -error #103703

    rajesh gupta
    Participant

    What is the cause of the error ‘_getexportcolumntype’.

    Your sample works good
    https://jqwidgets.github.io/angular-grid/#/

    export – grid -error #103705

    Martin
    Participant

    Hello rajesh gupta,

    How are you creating the columns?
    Could you provide your code for gridColumns?

    Best Regards,
    Martin

    jQWidgets Team
    http://www.jqwidgets.com/

    export – grid -error #103733

    rajesh gupta
    Participant

    It is solved. In the source, the datafields ‘type’ was not set for all fields.

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.