locked
Valuea of Selected Rows in Subgrids and JavaScript in ms crm 2011 RRS feed

  • Question

  • How to get or retrieve value from selected row in Subgrid?

    what event that can capture this?


    hussain

    Saturday, July 19, 2014 1:21 AM

All replies

  • Hi Hussain,

    You could check this http://lakshmanindian.wordpress.com/2012/05/25/retrieve-subgrid-rows-in-crm-2011-using-jscript/

    you can bound js event with subgrid and on selection you can retrieve value.


    Our Website| Our Blog | Follow US | My Facebook Page | Microsoft Dynamics CRM 2011 Application Design
    Make sure to "Vote as Helpful" and "Mark As Answer",if you get answer of your question.

    Saturday, July 19, 2014 6:11 AM
    Moderator
  • thank you for the information.

    The problem with that script it wont retun the value of the 2nd or 3rd column.

    It will only return the value of the first column on that subgrid.

    function GetSubGridSelectedRows() {
        var grid = document.getElementById("accountContactsGrid").control;
         for (var rowNo = 0; rowNo < grid.get_selectedRecords().length; rowNo++) {
            alert(grid.get_selectedRecords()[rowNo].Id);
            alert(grid.get_selectedRecords()[rowNo].Name);
        }
    }


    hussain

    Saturday, July 19, 2014 4:32 PM
  • The problem with that script it wont return the value of the 2nd or 3rd column.

    It will only return the value of the first column on that subgrid.

    function GetSubGridSelectedRows() {
        var grid = document.getElementById("accountContactsGrid").control;
         for (var rowNo = 0; rowNo < grid.get_selectedRecords().length; rowNo++) {
            alert(grid.get_selectedRecords()[rowNo].Id);
            alert(grid.get_selectedRecords()[rowNo].Name);
        }
    }


    hussain

    Saturday, July 19, 2014 4:34 PM
  • Please check following link :

    http://vikramxrm.blogspot.ae/2013/12/read-sub-grid-cell-value-ms-crm-2013.html


    Hope this helps. If you get answer of your question, please mark the response as an answer and vote as helpful !!!
    Vikram Singh. !!!  My Blog

    Sunday, July 20, 2014 6:28 AM