Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - roofus

Pages: [1]
1
Hi,

We're got a strange situation with one instance of our grid. I key in a number in the column Breakout Value, then tab to move off the column. For example, 1000 was pulled from the database and I type in 5000 in that cell. When I hit the tab key, the red triangle shows up on the changed cell. However, isDirty() returns false. getChanges also returns a blank object.

If I copy the value 5000 from any other cell and paste into the row that was originally 1000, the red triangle faithfully shows up on the changed cell. This time, isDirty() returns true. And getChanges correctly contains the changed values

How can the red triangle appear to show changes but isDirty() says false? Why would it work differently (and correctly) if I paste in the value instead of keying it?

Definition within the column model:

        {
            title: "Breakout Value",
            width: 180,
            editable: true,
            hidden: false,
            dataType: "float",
            dataIndx: "BREAKOUT_VALUE",
            editModel: { keyUpDown: true },
            render: function (ui) {
                var cellData = ui.cellData;
                if (cellData) {
                    var num = Number(parseFloat(cellData).toFixed(0));
                    return num.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",");
                }
            }
        },

Within the data model:

    var dataModelPercent = {
        location: "local",
        dataType: "JSON",
        method: "GET",
        getUrl: function () {
            return { url: Url4Percentcontroller };
        },
        getData: function (response) {
            return { data: response };
        },
        recIndx: "PERCENT_TYPE_VAL",
    };

Pages: [1]