Announcement

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

    ListGrid data not removed even after updateCaches()

    Hi,

    I am using a ListGrid which gets the data as JSON String. We are using messages API from SmartGWT.
    When the data is deleted from the database, the deleted data is sent from backend to UI through a channel in the Map. I am trying to remove the record matching the data from the ListGrid.

    Map dataMap= (Map<String, String>)JSOHelper .convertToJava(data)
    Record record = new Record();
    for (String column : dataMap.keySet()) {
    record.setAttribute(column, dataMap.get(column));
    }
    DSResponse response = new DSResponse();
    response.setData(record);
    DSRequest dsRequest = new DSRequest();
    dsRequest.setOperationType(DSOperationType.REMOVE);
    DataSource.updateCaches(response, dsRequest);
    ListGrid.fetchData();

    Please advice or correct me where I am doing wrong.

    Thanks

    #2
    You haven't set an operationType on the response.

    Comment

    Working...
    X