On the client-side, you can do the following:
var hasEvents = dps.findRowByResourceId("A").events.length > 0;
On the server side, there is no internal structure that keeps events matched to the resources. You would have to go through the data source (you can reuse what you assign to DataSource property, so you don't have to load everything from the database twice).
See also the following tutorial that filters resources depending on the associated events. It works the other way - i.e. it shows only the free rows but you should be able to adjust the SELECT command as needed:
http://code.daypilot.org/34704/restaurant-table-reservation-tutorial-asp-net-c-vb-net