Get the selected records in table inside a Widget

How can I get the currently selected records in table inside a widget. I need to make calculations based on some attributes of these records.
Was this page helpful?