typescriptmodel-view-controllerserenity-platform

Change selected row checkbox value in Serenity platform


This question is related to Serenity platform development.

I've a grid using __id as idfiled:

protected getIdProperty() { return "__id"; }

I also added a checkbox for each row:

 this.rowSelection = new Serenity.GridRowSelectionMixin(this);

The question is: How to change the value of the check box from __id to use one of the column values (example: StudentID not always unique)

Thanks


Solution

  • this.getSelectedKeys().map(x => 
            this.view.getItemById(Q.toId(x))
                  .StudentID).filter(x => x != null)