Announcement

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

    ListGrid does not update when grouped

    I am using DataSource.updateCaches() to add new records to a ListGrid based on events received from the server. This is working when the ListGrid is not grouped by one of the columns, but it doesn't seem to show the new records when the ListGrid is grouped. Here is my update code:

    Code:
    public void onJobAdded(JobAddedEvent event) {
    	String jobId = event.getJobId();
    	Criteria criteria = new Criteria();
    	criteria.addCriteria("jobId",jobId);
    	dataSource.fetchData(criteria, new DSCallback() {
    		@Override
    		public void execute(DSResponse response, Object rawData, DSRequest originalRequest) {
    			DSRequest request = new DSRequest();
    			request.setOperationType(DSOperationType.ADD);
    			dataSource.updateCaches(response, request);
    		}
    	});
    }
    The DataSource is bound to a REST API that returns records as JSON. When I get an event from the server telling me that a new record is available, I'm using the DataSource to query the server for the single record and then I'm attempting to inject it into the datasource by faking a DSResponse to an ADD DSOperation and calling updateCaches(). This works fine unless the ListGrid is grouped. If it's grouped, the code runs without exceptions, but the ListGrid doesn't update.

    What am I doing wrong?

    Browser: Internet Explorer 8.0.7601.17514
    GWT: 2.3.0
    SmartGWT: 2.4

    James

    #2
    Hi James
    We're not reproducing this issue - it has most likely been fixed since the 2.4 release - can you try with a recent nightly build

    http://www.smartclient.com/builds

    Comment

    Working...
    X