Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    ListGrid startEditingNew getCellCSSText conflict

    I have a ListGrid with a modified getCellCSSText function, to change some rows to a red highlight based on certain criteria. AutoFetchData is false.

    Here's the function
    Code:
                getCellCSSText: function (record, rowNum, colNum) {
                    if (record.INVENTORY_ITEM_ID == "") {
                        return "font-color : red;";
                    } else {
                        return "font-color : black;";
                    }
                }
    However, when startEditingNew() is called to add a new row, before it even draws the blank row to enter data, I get the following error, and the blank row is never presented:
    Code:
    record has no properties
    if (record.INVENTORY_ITEM_ID ==""){
    After that, the listGrid refetches its data.

    How I can tell the listGrid not to call getCellCSSText when startEditingNew is called?

    #2
    You can't, but you can trap this pretty easily by returning null if record is null...

    Comment

    Working...
    X