Building on Dan's reply, try:
NamesDefaultToHere(1);
// Some data
dt = New Table( "Fruits",
Add Rows( 3 ),
New Column( "Fruit",
Character,
"Nominal",
Set Values( {"Pear", "Apple", "Orange"} )
)
);
// A report with a local data filter
gb = dt << Graph Builder(
Size( 528, 448 ),
Show Control Panel( 0 ),
Show Legend( 0 ),
Variables( X( :Fruit ) ),
Elements( Bar( X, Legend( 3 ) ) ),
Local Data Filter( Mode, Add Filter( columns( :Fruit ) ) )
);
// Row state handler function
doSomethingWithSelection = Function({x}, {Default Local}, Beep(); Wait(0.1); Beep() );
// Get a reference to the report
gbReport = gb << Report;
// See what messages the data filter display box understands (prints to the log)
ShowProperties(gbReport[OutlineBox(1)]);
// Assign the row state handler to the local data filter display box
rsh = gbReport[OutlineBox(1)] << MakeRowStateHandler(doSomethingWithSelection);