InforCRM Dialog is Falling Off the Screen
If you use a dialog with very tall content, InforCRM will automatically add scroll bars to it when it opens up. No problem there. The problem begins when you add content AFTER the dialog was initially opened – for example, if you have a grid with a filter condition that can add data. When the dialog is initially displayed, the height is detected as lower than the browser window’s height and left as “auto”. But once the grid is filled, the dialog is suddenly much taller! Dojo doesn’t know about it because that content gets added by ASP.NET so it does not resize itself appropriately and needs a little bit of a nudge.

This is what I used on my dialog’s page (this can run in the OnFormBound event):

ScriptManager.RegisterStartupScript(this, GetType(), "ResizeDialog", @"    
    setTimeout(function() {
        var dlgWin = dijit.byId('DialogWorkspace_window');
    }, 1);   
", true);

With that code, the dialog automatically resizes (with a scrollbar) and centers itself.

Share This