Make a button visible if NO rows are displayed

Userlevel 3
Badge +16

Hi all,


On a editable list view, i have an Add button hidden, but if a user deletes all the rows in the editable list, i want to make the Add button visible, is this possible?


Is there a way of saying if "no editable rows visible" set properties of Add button Visible?

2 replies

Badge +4

Hi Sharpharp1,


You can try this way.


Create a new expression using list count under list aggregators function operators and count your list items using one of your list columns.Then in rules, you can check if expression value is zero then show your add button otherwise hide the control.




Userlevel 3
Badge +16

Thanks Vijay,


I had already tried this, but I looked again after your reply.


The problem was this was not working because the record was not saved, if the user hits delete toolbar before it is saved.

So what i've done is hide the Add Toolbar button, forcing the user to hit a SAVE column button, then using your suggestion, the count is incremented and the Add toolbar is showed and the column button hidden with a SAVE method.


Shame i can't get K2 to automatically add a new row without the user manually have to click a button. Click button rules do not work if the Row is in edit mode....