Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents

Description

ListGrid displays a list of objects in a grid, where each row represents one object and each cell in the row represents one property.

...

Code Block
titleUpdate by DataSource
langjavascript

var dataSource = supplyItemListGrid.getDataSource();

var request = {
    startRow: 0,
    endRow: (supplyItemListGrid.getVisibleRows()[1] + supplyItemListGrid.data.resultSize),
    sortBy: supplyItemListGrid.getSort(),
    showPrompt: false
};

var selectedRows = supplyItemListGrid.getSelectedState()
var callback = function(dsResponse,data,dsRequest) {
    var resultSet = isc.ResultSet.create({
        dataSource: supplyItemListGrid.getDataSource(),
        initialLength: dsResponse.totalRows,
        initialData: dsResponse.data,
        sortSpecifiers: supplyItemListGrid.getSort(),
        criteria: supplyItemListGrid.getCriteria()
    });

    supplyItemListGrid.setData(resultSet);
    supplyItemListGrid.setSelectedState(selectedRows);
};

dataSource.fetchData(supplyItemListGrid.getCriteria(), callback, request);

Attachments

Attachments