jQuery UI Widgets Forums TreeGrid Change Source

This topic contains 1 reply, has 2 voices, and was last updated by  Peter Stoev 10 years, 6 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • Change Source #62996

    AJRames
    Participant

    Hi there,

    I have TreeGrid which is based on a xml source.

    var source =
                {
                    datatype: "xml",
                    datafields: [
                        //{ name: 'Id' },
                        //{ name: 'TypeGeb' },
                        //{ name: 'StatusGeb' },
                        //{ name: 'NoticeGeb' },
                        //{ name: 'DateSmallGeb' },
                        //{ name: 'DateBigGeb' },
                        //{ name: 'SpokenWithExpertGeb' },
                        //{ name: 'NameGeb' },
                        //{ name: 'DepartmentGeb' },
                        //{ name: 'PersonalnumberGeb' },
                        //{ name: 'KeywordGeb' },
                        //{ name: 'DescriptionGeb' },
                        //{ name: 'InvolvedPeopleGeb' }
    
                        { name: 'ID', map: 'm\\:properties>d\\:Id'},
                        { name: 'Type', map: 'm\\:properties>d\\:Type', type: 'string' },
                        { name: 'Status', map: 'm\\:properties>d\\:Status', type: 'string' },
                    ],
                    hierarchy:
                        {
                            groupingDataFields:
                                [
                                    {
                                        name: "Status"
                                    }
                                ]
                        },
                    root: "entry",
                    record: "content",
                    id: { name: 'ID', map: 'm\\:properties>d\\:Id'},
                    url: url
                };

    Is it possible to change the groupingDataFields property afterwards?
    Or to do it in the datadapter?

    I just want to prevent that I have to load a second data source with the same data as the first one just to change the groupingDataFields property of the source…

    Thanks in advance

    Change Source #63001

    Peter Stoev
    Keymaster

    Hi AJRames,

    The solution is: create a new instnace of jqxDataAdapter and set the TreeGrid’s source property to point to it.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com

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

You must be logged in to reply to this topic.