<html><body><div style="color:#000; background-color:#fff; font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:12pt">In Delphi this will work even if the Sender is not a TdbGrid, as long as it has a DataSource property:<br><br> TdbGrid(Sender).datasource:=myDataSource;<br><br>But it won't work in Lazarus if Sender is a different dbAware component., the compiler will complain it's not a dbGrid.<br><br>Is there anyway to accomplish this same result in Lazarus, perhaps by using RTTI? Or is there a compiler directive to stop this check?<br><br>An example would be great. Thanks.<br><br>A. G.<br><div><br></div></div></body></html>