What do i need to do in my itemStyle.xsl to hide webpart when there are no items. When RowCount is 0. Thanks i advance
if you got access to your webpart code then, by default make it invisible. then you can use two event receivers one for item adding to make webpart visible and another one for item deleting as if a item is deleted check if list is empty if it is then hide webpart.
you can access your webpart properties by referencing it using its dll in event receivers.
you can access more properties over here
You can't control the visibility of the CQWP from the ItemStyle.xsl. That file only helps display items in the webpart, not control the visibility of it.