Home > CRM 2011, JScript > CRM 2011 sub grid grey out/freezing issue – workaround

CRM 2011 sub grid grey out/freezing issue – workaround

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


  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: