Author Topic: Track changes on detail grid possible?  (Read 2019 times)

KR

  • Pro Enterprise
  • Newbie
  • *
  • Posts: 8
    • View Profile
Track changes on detail grid possible?
« on: July 22, 2016, 11:48:48 am »
Hello,

My application is roughly based on your example on http://paramquery.com/pro/demos/nesting

I would like to enable track changes on each detail grid. I added recIndx and trackModel to gridDetailModel in your example, but it is not working. Am I overlooking something?

Code: [Select]
var gridDetailModel = {

    recIndx: "ProductID",
    trackModel: {
        on: true
    },

    width: "flex",
    pageModel: {
        type: "local",
        rPP: 5,
        strRpp: ""
    },
    columnBorders: false,
    showTop: false,
    showBottom: false,
    sortModel: {
        sorter: [{
            dataIndx: 'ProductName',
            dir: "up"
        }]
    },
    dataModel: {
        location: "remote",
        dataType: "jsonp",
        method: "GET",
        getData: function(dataJSON) {
            return {
                data: dataJSON.data
            };
        }
    },
    colModel: [{
        title: "Order ID",
        width: 85,
        dataIndx: "OrderID"
    }, {
        title: "Product ID",
        width: 95,
        dataType: "integer",
        dataIndx: "ProductID"
    }, {
        title: "Product Name",
        width: 150,
        dataIndx: "ProductName"
    }, {
        title: "Unit Price",
        width: "100",
        align: "right",
        dataIndx: "UnitPrice",
        dataType: "float",
        summary: {
            type: "sum"
        }
    }, {
        title: "Quantity",
        align: "right",
        width: 85,
        dataIndx: "Quantity",
        dataType: "integer",
        summary: {
            type: "sum"
        }
    }, {
        title: "Discount",
        width: 80,
        align: "right",
        dataIndx: "Discount",
        dataType: "float"
    }],
    groupModel: {
        on: true,
        dataIndx: ["OrderID"],
        dir: ["up"],
        title: ["{0} - {1} product(s)"],
        icon: ["ui-icon-triangle-1-se", "ui-icon-triangle-1-e"]
    },
    refresh: function(evt, ui) {
        if (ui.source != "flex") {
            this.flex();
        }
    },
    //flex: { one: true },
    height: 'flex',
    numberCell: {
        show: false
    },
    title: "Order Details"
};

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6260
    • View Profile
Re: Track changes on detail grid possible?
« Reply #1 on: July 22, 2016, 01:15:07 pm »
Correction: recIndx is a property of dataModel.

Yes tracking of detail grid is possible.