Sunday, January 13, 2013

Can a custom navigation link have an arbitrary ribbon showing?

Can a custom navigation link have an arbitrary ribbon showing?

I'm customizing the Quote entity, aiming to replace the stock Quote Products grid with a customized, Silverlight-powered DataGrid. It basically aims to extend the basic "related records view" functionality (mostly, it adds some calculated fields and inline editing, nothing too fancy).

Of course, the more seamlessly integrated the whole thing ends up to be, the better: I skinned it nicely, basic functionalities are there, but the Ribbon is a big issue, I would like it to show up the Quote Details SubGrid ribbon but obviously the thing has no knowledge about what my custom navigation link is showing.

I know Ribbon Rules but they don't seem to address this need; I'm not aware of any XRM function to accomplish it either. Is it even doable ? If so, how can I accomplish this ?


More about what I already have:

I added a custom link (let's name it My Awesome Grid) to the lefthand Navigation Area, pointing to an HTML Web resource (let's name it new_AwesomeGridPage). This resource merely hosts a Silverlight application (which is yet another web resource, new_AwesomeGrid) containing a DataGrid which lists the Quote Details in a customized, fancier way. The grid is being fed via the OData service and everything works smoothly (it could be pointed out that it doesn't really matter where the data comes from and what it represents, and it would be true of course), except for the Form Ribbon which doesn't "switch" like it does when one clicks a builtin navigation link for a related entity. I am thereby wondering how (if?) one can force the ribbon to show the commands for an arbitrary related entity, when a custom navigation link is used to show an HTML Web Resource ?

Answers & Comments...

Answer: 1

Hmm bit of an awkward situation, I'm afraid I don't have a detailed solution to this, just an approach.

As far as I know there is no way to just 'hook up' the standard ribbon to a custom Silverlight grid.

I think what you will have to do is; add enable/visibilty rules to all the existing buttons and then disable/hide them when someone is looking at your grid. What form this rule will take I'm not sure, possibly JavaScript.

Then create new buttons with JavaScript actions that communicate with your Silverlight application, then have your Silverlight application perform whatever logic is required.

For ribbon customisations I would suggest starting with the Ribbon Workbench, its an excellent tool for ribbon editing.

by : James Woodhttp://stackoverflow.com/users/1569689




No comments:

Post a Comment

Send us your comment related to the topic mentioned on the blog