Adding a context menu to a SharePoint custom web part

Jessica and I were chatting on Tuesday about the possibility of reusing the SharePoint context menu infrastructure in a custom web part.  The basic idea was to take the context menu customization concepts explained here, and extend this so that any table rendered from a custom web part could make use of the context menu infrastructure in ows.js to display its own custom menu using the same familiar styles to the end user.

First Process

Well, that was Tue, now its Thu...job done, delivered to the customer, and an article posted up here explaining how it's all done.  I love blogging.