Let me setup the screen for you…
The user is presented a list of documents in a treeview. They can re-order the documents via drag & drop (one or many), delete them from the list (one or many), or denote them as a special document type (one or many – special type also changes the node icon).
Each one of these functionalities are currently being handled via buttons below the treeview. So if the user decides to re-order they would update the DB via the update order button. If they want to delete one or several documents they select the item(s) and click the delete button (updates DB). If they want to denote the document as a special type they select one or several and click the type button (updates DB).
With the new requested functionality the user wanted to have an ‘edit’ button next to a specific document type that meet certain criteria. IE: Only document types of ‘endorsement’ that are in ‘released’ status would see an edit button next to the node.
When the user clicks the ‘edit’ button we do a bunch of magic that would remove the current document, and replace it with a new document with a status of ‘work in progress’.
Now, with that said, I could easily add another button below the treeview that would handle this functionality – figure out what node was selected, remove it, add a new node, and do the document creation process. But, if there was a way to add a button next to the node text it would save me a lot of checking to see if the node is the correct document type and status, before I process. Also, it would also stop me from having to check if they selected many documents – this functionality can only be performed on one document at a time.
I hope I made myself clear.