jQuery UI Widgets Forums Grid can we mention ID using map:

This topic contains 1 reply, has 2 voices, and was last updated by  Dimitar 9 years, 10 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • can we mention ID using map: #53827

    pankhi
    Participant

    Hi

    I am using jqxwidget to edit and list record:-
    In source I have written following code. In id how can I mention the path like i did for name ( map:”SystemEmailgroupEmail>Name”).
    var source =
    {
    datatype: “json”,
    datafields:
    [
    { name: ‘Name’, map:”SystemEmailgroupEmail>Name”, type: ‘string’ },
    { name: ‘Email’,map:”SystemEmailgroupEmail>Email”, type: ‘string’ },
    { name: ‘groupName’,map:”SystemEmailgroupGroup>groupName”, type: ‘string’ },

    ],
    id: ‘id’,
    url: url,
    };

    in the grid I have id: ‘id’ which tells the grid where the id is
    in a regular json the json is [{id:…..
    so id: ‘id’ works
    but in map the id that I want is inside another container in the json
    so I have to give the grid where the id is :
    id: ‘somewhere…..’
    will you please guide me how can I mention id??

    Thanks

    can we mention ID using map: #54164

    Dimitar
    Participant

    Hello pankhi,

    The id should also be mapped, e.g.:

    var source =
    {
        datatype: "json",
        datafields: [
            { name: 'empName' },
            { name: 'age' },
            { name: 'id', map: 'department>id' },
            { name: 'name', map: 'department>name' },
            { name: 'author' }
        ],
        id: 'id',
        localdata: data
    };
    var dataAdapter = new $.jqx.dataAdapter(source);

    Please refer to the tutorial Grid Data Sources for more information.

    Best Regards,
    Dimitar

    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.