Announcement

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

  • claudiobosticco
    replied
    Thanks for the suggestion.

    I need it to set ListGridRecord.singleCellValue for some records.
    But I need a slightly different behavior for different grids.
    Is it supported to test for dsRequest.componentId inside transformResponse?
    Otherwise I'll have to use different operationIds, but I don't really like it because it's only a different presentation logic, not a difference in server side behavior.

    Leave a comment:


  • Isomorphic
    replied
    Yes, DataSource.transformResponse(). If it should only happen for a certain component, you can use a special operationId via listGrid.fetchOperation.

    Leave a comment:


  • claudiobosticco
    replied
    Thanks, so...isn't there a way to modify the data returned after a refresh, before the ResultSet gets replaced?

    Leave a comment:


  • Isomorphic
    replied
    Neither notification fires, since the underlying ResultSet actually gets replaced. If you need a notification of completion of the refresh, you can pass a callback to refreshData().

    Leave a comment:


  • claudiobosticco
    replied
    besides, it doesn't trigger transformData on the grid's ResultSet

    Code:
    isc.IButton.create({
        ID:"refreshButton",
        title:"Refresh Data",
        click:"dsListGrid.refreshData()"
    })
    
    isc.ListGrid.create({
        ID:"dsListGrid", 
        top:30,
        width: "100%",
        height: "100%",
        minFieldWidth:80,
        autoFetchData: true,
        dataSource: "supplyItem",
        dataArrived:function(startRow, endRow) {
            isc.logEcho("dataArrived")
        },
        dataProperties: {
            transformData: function (newData, dsResponse) {
                isc.logEcho('transformData')
            }
        } 
    });
    instead, invalidateCache triggers both.

    Leave a comment:


  • ListGrid.refreshData() doesn't trigger dataArrived notification

    SmartClient Version: SNAPSHOT_v11.1d_2016-09-22/Enterprise Deployment (built 2016-09-22)

    Chrome on OSX El Capitan

    Hell, I've just noticed that ListGrid.refreshData() doesn't trigger the dataArrived notification.

    Is it a bug, or by design?

    Test case:

    Code:
    isc.IButton.create({
        ID:"refreshButton",
        title:"Refresh Data",
        click:"dsListGrid.refreshData()"
    })
    
    isc.ListGrid.create({
        ID:"dsListGrid", 
        top:30,
        width: "100%",
        height: "100%",
        minFieldWidth:80,
        autoFetchData: true,
        dataSource: "supplyItem",
        dataArrived:function(startRow, endRow) {
            isc.logEcho("dataArrived")
        } 
    });
Working...
X