If the rendered property doesn't work for you (although it should), you could always wrap the datatable in an <xp:div> and set the rendered property on that component.
To check if there are results to display in the datatable you can use
getComponent("yourDataTableId").getRowCount() > 0
Mark