Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR TYPESCRIPT

serenity.is custom list endpoint

protected getGridCanLoad() {
  EntityService.GridList({
    //Criteria: [[EntityRow.Fields.Id], 'in', [EntityIds.split(",")]]
    ColumnSelection: Serenity.ColumnSelection.KeyOnly,
    IncludeColumns: [
      EntityRow.Fields.Code,
      EntityRow.Fields.Number,
      EntityRow.Fields.SystemId,
    ]
  }, response => {
    this.view.setItems(
    response.Entities
    , true)
  });
  return super.getGridCanLoad() && false;
}
protected getColumns() {
  var columns = super.getColumns();
  columns.unshift({
    field: 'Description',
    name: 'Description',
    //format: ctx => '<a class="inline-action action-row" title="action"><i class="fa fa-icon"></i></a>',
    //width: 24,
    //minWidth: 24,
    //maxWidth: 24,
    sortable: true,
    visible: true
  });
  return columns;
}
 
PREVIOUS NEXT
Tagged: #custom #list #endpoint
ADD COMMENT
Topic
Name
6+5 =