jQuery UI Widgets Forums Grid Row Details from JSON

This topic contains 4 replies, has 2 voices, and was last updated by  dzimen 5 years, 4 months ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
  • Row Details from JSON #103530

    dzimen
    Participant

    Hi, I have problem with function initrowdetail(), because I want get data from JSON. This is my code: https://pastebin.com/aDGxr5H0

    First JSON is a main data to table and they display you well. Second JSON is for a row details. I see table after collapse row, but this grid is empty. JSON has a data, becouse I see data when I enter this url (JSON) in Google Chrome. I think that problem is in function initrowdetail()

    Please for quick help

    Row Details from JSON #103550

    Martin
    Participant

    Hello dzimen,

    Please, try setting the async property of the detailsource to ‘false’.

    var detailsource = {
        dataType: "json",
        dataFields: [{
           name: 'pset',
           type: 'int'
        }, {
           name: 'sequence',
           type: 'int'
        }, {
           name: 'batchSize',
           type: 'int'
        }],
           id: 'id',
           // root: 'Details',
           // record: 'Detail',
           url: '${pageContext.request.contextPath}/barcode-list/getBarcodeDet',
           type: 'GET',
           async: false
        };

    This should fix the issue.

    Best Regards,
    Martin

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

    Row Details from JSON #103585

    dzimen
    Participant

    This code show Nested Grid: https://pastebin.com/RERfaTVj
    But Nested Grid show all data of this database table. How I can to group data in Nested Grid? I want display in Nested Grid specific record from database.
    These two bases are connected with relation. Can you help me?

    Row Details from JSON #103606

    Martin
    Participant

    Hello dzimen,

    Could you clarify what the issue is?
    The records displayed in the nested grid depend on what data source you are passing, when you are creating it. In your case, this is the localdata of the detailsource.

    Best Regards,
    Martin

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

    Row Details from JSON #103622

    dzimen
    Participant

    That’s right, but on the demo I saw that the data in the nested grid is grouped relative to the main record. In the database, these two tables have a relation by ID relation, i.e. this nested grid in the database has several same IDs which means that it belongs to the main record of another table. Generally, one table is the main table and the other is only additional parameters for a given record of the first table. Is there an option to group this relative to the main records in the table?

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

You must be logged in to reply to this topic.