Select a record in a grid
- 1. Summary
 - 2. Result
 - 3. Step by Step Guide
 - Events
 - MenuFunction
 - 4. Documentation
 
1. Summary
It shows here how to select a record in a grid via pro code.
2. Result
A record can be selected via pro code
3. Step by Step Guide
Undocumented method: const selectedRecords = grid.getSelectedRecords();
Events
There are two events of a SwatGrid control
- EventRowChosen
 - EventRowSelected
 
MenuFunction
If you want to use a MenuFunction via a Button you can use something like this (only the typeScript part):
export function doSthOnRecord( self ) {
   const selectedRecord = self.parent.getLink('PRIMARYSDO:TARGET').controller.getSelectedRecord(); 
...4. Documentation
To find more information, you can check the following documentation.
Grid / Table 
Back to Use Cases 
Back to Home Page