Announcement

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

    ListGrid field of type image does not update after updateData() call

    We have a ListGrid with a field as follows:

    Code:
    {title:"Status", name:"STATUS", type:"image", imageURLPrefix: "", imageURLSuffix: ".gif"}
    This allows us to map PROCESSING and IMPORTED icons into that column, based on the row data. A very cool feature, BTW. We book an order as follows:

    Code:
    orderReviewListGrid.setEditValue(rowNum, "STATUS", "PROCESSING");
    to turn on the PROCESSING image in the field (an animated gif, actually), then we do an updateData() to trigger the action on the server, which returns the full updated row, including a STATUS of IMPORTED. The image field never updates to the new image when this occurs. Other fields, such as the order number, update as expected.

    Additionally, and as expected, explicitly updating the STATUS column in the callback works:

    Code:
    orderReviewListGrid.updateData(newRecord, this.getID() + ".parent.orderReviewListGrid.setEditValue(rowNum, 'STATUS', 'IMPORTED');");
    And the new image is shown in the field.

    Are image type fields intended to automatically update based on new values that come back from an update operation?

    Pete

    #2
    Hi Pete,

    They definitely are expected to update automatically.

    After the update completes, if you call markForRedraw() on the grid do you see the updated value? If so, then this is some kind of bug with visual refresh not occurring. If not, somehow the updated value is not being applied to the record, and you should look at the ResultSet log category to see if the data being returned is what you expect (look for typos, etc).

    Comment


      #3
      This was apparently caused by my using updateData() and returning a full record where non-modified columns were not updated in the ListGrid. Works exactly as expected when setEditValue() and saveEdits() are used to programatically cause an update operation to occur on the data source.

      It's not you, it's me. LOL

      Comment

      Working...
      X