Archive for January 30, 2013

CRM 2011 sub grid grey out/freezing issue – workaround

January 30, 2013 Leave a comment

We have a custom entity form having 2 sub grids.



The problem was, when we open the record and click on ‘Save’ ribbon button (I.e., updating record)

  • Sub grids are not getting refreshed
  • Sub grid section is greying out
Subgrid - grey out

Subgrid – greyed out

To fix the sub grid refresh issue, we used below retry logic as workaround

Retry logic

  • On page load, check for the “ready state” of your ‘Sub grid’
  • If sub grid load properly (i.e., readyState == “complete”) no issues
  • Else If readyState != “complete”
    • Wait for 1 second and check for the sub grid state
    • Repeat  it for 5 times (i.e., Wait for 5 seconds)
    • If sub grid not loaded thereafter also, reload the page

Jscript to implement the Retry logic

function refreshGrids() {

    var mySubgrid = document.getElementById(“{Sub grid name}“);

    if (mySubgrid == null || mySubgrid.readyState != “complete”) {

        if (indxCount == 5) {

            // Reload the page after 5 attempts

            if (window && window.parent) {




        // Wait 1 second and then call same function again    

        setTimeout(‘refreshGrids()’, 1000);




Where to place the above function

  • Register “refreshGrids()” function, on “onload” event of JScript