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
Tell me more
×
SharePoint Stack Exchange is a question and answer site for
SharePoint enthusiasts. It's 100% free, no registration required.
|
|
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. To control the visibility you'd have to either create your own webpart inheriting the CQWP or make some javascript which hides it. |
|||
|
|
|
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 |
|||
|
