jQuery UI Widgets Forums TreeGrid TreeGrid only exports first row

This topic contains 3 replies, has 2 voices, and was last updated by  Peter Stoev 9 years, 11 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
  • TreeGrid only exports first row #62592

    AJRames
    Participant

    Hello All,
    I am currently facing a problem using the exportData method.

    I have a TreeGrid that is grouped by a column.
    Now I want to export the data.
    The problem is, that it only exports the first row (which is the grouped row, with no useful data).

    Here is the important code:

     var source =
                {
                    dataType: "json",
                    dataFields: [
                        { name: 'Id', type: 'string' },
                        { name: 'ConfigTemplateName', type: 'string' },
                        { name: 'ConfigBookmarkName', type: 'string' },
                        { name: 'ConfigBookmarkMapName', type: 'string' }
                    ],
                    hierarchy:
                        {
                            groupingDataFields:
                                [
                                    {
                                        name: "ConfigTemplateName"
                                    }
                                ]
                        },
                    id: 'Id',
                    url: url
                };
    var dataAdapter = new $.jqx.dataAdapter(source);
    
    $("#treeGrid").jqxTreeGrid(
                {
                    width: '100%',
                    source: dataAdapter,
                    pageable: false,
                    editable: true,
                    filterable: true,
                    filterMode: 'simple',
                    altrows: true,
                    columns: [
                      { text: 'Template', dataField: "ConfigTemplateName", align: 'left', width: '33%' },
                      { text: 'Textmarke', dataField: "ConfigBookmarkName", align: 'left', width: '33%' },
                      { text: 'Feldname', dataField: "ConfigBookmarkMapName", align: 'left' },
                      { text: 'ID', dataField: "Id", align: 'left', hidden: true }
                    ]
                });
    
     function saveButton() {
                $("#treeGrid").jqxTreeGrid({ exportSettings: { columnsHeader: false, hiddenColumns: true, serverURL: null, recordsInView: true, collapsedRecords: true, fileName: null } });
    
                $('#<%=HiddenField1.ClientID%>').val($("#treeGrid").jqxTreeGrid('exportData', 'json'));
            }

    Can you help me on this issue?

    Best regards

    TreeGrid only exports first row #62595

    Peter Stoev
    Keymaster

    Hello AJRames,

    Please, provide a complete sample which we can test. The provided one cannot be tested, because we don’t know what is displayed in the widget.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com

    TreeGrid only exports first row #62651

    AJRames
    Participant

    Hello Peter,

    here is an image of my tree grid.
    Grouped Data

    As you can see the entries are grouped.
    When I export the data only the first row (with the grouped data) is exported.

    TreeGrid only exports first row #62662

    Peter Stoev
    Keymaster

    Hi AjRames,

    Please, provide a jsfiddle.net. From Image, we cannot debug your issue. We cannot reproduce it with a test sample, too.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com

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

You must be logged in to reply to this topic.