Logo

    Home

    Documentation

    Use Cases

    Training

    Applications

    Release Notes

    Pro-Code: get selected record

    Pro-Code: get selected record

    icon

    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();

    image

    Events

    There are two events of a SwatGrid control

    1. EventRowChosen
    2. 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 / TableGrid / Table

    Back to Use CasesUse Cases

    Back to Home Page

    Logo