locked
CRM 2011 Read Only subgrid RRS feed

  • Question

  • Hello all.

    I have a custom entity called new_friend which has a N:1 relationship with account entity (new_accountid is the relationship lookup).

    On the new_friend form, I need to display a subgrid of the account's contacts; the challenge being that this subgrid CANNOT be edited and user should not be able to open a contact form by double-clicking on the subgrid's row.

    I can customize the ribbon but how to prevent the user from double-clicking on the subgrid's row?
    Also, this subgrid is READ ONLY for ALL users, no exception.

    What are my options (if any)?

    Thanks,


    Frank


    • Edited by FrkM Wednesday, February 5, 2014 6:29 PM
    Wednesday, February 5, 2014 6:27 PM

Answers

All replies

  • Hi Frank,

    There's no supported way to make a sub-grid read only as far as I am aware. Your best/nicest option would be to build a html web resource that shows the associated contacts but is read-only. You could do the same with a Silverlight control but that wouldn't work some devices such as an ipad.

    Rob


    MCTS. GAP Consulting Ltd. Microsoft Community Contributor Award 2011 & 2013

    • Proposed as answer by Minal Dahiya Thursday, February 6, 2014 12:49 AM
    • Marked as answer by FrkM Thursday, February 6, 2014 1:28 AM
    Wednesday, February 5, 2014 10:02 PM
    Answerer
  • Hi Rob,

    Thanks for your response (which doesn't really surprise me).
    Do you know where I could find a sample or tutorial that would allow me to get started (for HTML, not Silverlight).

    Thanks,

    Frank


    Frank


    • Edited by FrkM Wednesday, February 5, 2014 10:15 PM
    Wednesday, February 5, 2014 10:15 PM
  • Hi,

        There are couple of examples in SDK for the same.

    http://www.microsoft.com/en-au/download/details.aspx?id=40321

    Here are few useful links for the same as well:

    http://mscrmtools.blogspot.com.au/2013/01/full-featured-crm-grid-in-htmljs.html

    http://msdn.microsoft.com/en-us/library/gg309536.aspx


    Hope this helps.
     
    -----------------------------------------------------------------------
     Minal Dahiya
    blog : http://minaldahiya.blogspot.com.au/

     
    If this post answers your question, please click "Mark As Answer" on the post and "Vote as Helpful"

    • Proposed as answer by Minal Dahiya Thursday, February 6, 2014 12:49 AM
    • Marked as answer by FrkM Thursday, February 6, 2014 1:29 AM
    Thursday, February 6, 2014 12:49 AM
  • Thanks Minal, greatly appreciated.

    Frank

    Thursday, February 6, 2014 1:30 AM
  • Hi Frank,

    In your scenario.. Please call a line of  jscript code to disable the grid on the form onload event after grid loads.

    function disableGrid(){

    document.getElementById('Your_Grid_Id').disabled = true;

    }

    attach the above method on  onreadyStateChange of the Iframe where grid is being render. Check the condition of complete of loading event of Iframe. The line of code will make the grid disabled.

    Thanks

    Kuldeep

    • Proposed as answer by Kuldeep Trivedi Thursday, February 6, 2014 11:13 AM
    Thursday, February 6, 2014 11:13 AM
  • That code is unsupported and may break when future rollups or upgrades are applied.

    Use at your own risk Frank.

    Rob


    MCTS. GAP Consulting Ltd. Microsoft Community Contributor Award 2011 & 2013

    Thursday, February 6, 2014 11:25 AM
    Answerer
  • Can you provide example of how to do this?
    Saturday, March 15, 2014 10:32 PM