Grid PrintView() not working

I have a layout with a tabbar attached to it. I then have a grid attached to tab A, an calendar attached to tab b, and a layout attached to tab c. I then have three cells in that layout with grids attached to cells a and b, with the cell b grid rows dependent on the row selected from the grid in cell a. My issue is that I am trying to add a print button for the grid in cell a of this layout, but I keep getting the error “dhxGridStaging is not defined” for this button, regardless of where I put it. And I am using different variables for each grid, and am declaring the variable before use. I am also running my dhtmlx script logic after the page is loaded…

What could the cause be?

Code:

<?php ini_set("session.gc_maxlifetime", "28800"); ini_set("session.cookie_lifetime", "0"); session_set_cookie_params(28800); session_start(); if (isset($_SESSION['userinfo']['firstname'])) { $sessionTimeout = $_SESSION['userinfo']['expire']; $cur_time = time(); if ($cur_time > $_SESSION['userinfo']['expire']) { session_destroy(); echo 'Your session has expired! Log Back In'; } else { $welcome = "Welcome ".$_SESSION['userinfo']['firstname']; $admin = $_SESSION['userinfo']['admin']; $genaccess = $_SESSION['userinfo']['genaccess']; $ro = $_SESSION['userinfo']['readonly']; $matlTracker = $_SESSION['userinfo']['matl_track']; } } else { session_destroy(); header("Location: https://[site url]"); } ?>

<!doctype html>

LTI Scheduler body { padding: 0; margin: 0; } h1 { color: rgba(16,87,60,1.00); text-shadow: -2px -2px aliceblue, -2px -2px aliceblue, -2px -2px aliceblue, -2px -2px aliceblue; font-size: 35px; font-family: Segoe, "Segoe UI", "DejaVu Sans", "Trebuchet MS", Verdana, "sans-serif"; background-color: rgba(170,235,148,0.6); /*background-image: linear-gradient(to right, lightblue 0%, white 35%, white 65%, lightblue 100%);*/ background: linear-gradient(141deg, rgba(170,235,148,0.6) 0%, rgba(170,235,148,0.7) 10%, rgba(170,235,148,0.8) 20%, rgba(170,235,148,0.9) 40%, rgba(170,235,148,1.0) 50%, rgba(170,235,148,0.9) 60%, rgba(170,235,148,0.8) 70%, rgba(170,235,148,0.7) 80%, rgba(170,235,148,0.6) 90%); background-repeat: none; padding-left: 10px; margin: 0; height: 60px; } #title { text-shadow: none; float: left; text-align: center; width: 100%; } #settingsBtn { margin: 0.5%; color: white; background-color: rgba(16,87,60,1.00); font-weight: bolder; border-bottom-left-radius: 5px; border-bottom-right-radius: 5px; border-top-left-radius: 5px; border-top-right-radius: 5px; border-color: black; vertical-align: middle; height: 35px; float: right; text-shadow: none; } #logoutBtn { margin: 0.5%; color: white; background-color: rgba(16,87,60,1.00); font-weight: bolder; border-bottom-left-radius: 5px; border-bottom-right-radius: 5px; border-top-left-radius: 5px; border-top-right-radius: 5px; border-color: black; vertical-align: middle; height: 35px; float: right; text-shadow: none; } #newUserBtn { <?php if ($admin == 1) { ?> margin: 0.5%; color: white; background-color: rgba(16,87,60,1.00); font-weight: bolder; border-bottom-left-radius: 5px; border-bottom-right-radius: 5px; border-top-left-radius: 5px; border-top-right-radius: 5px; border-color: black; vertical-align: middle; height: 35px; float: right; text-shadow: none; <?php } else { ?> display: none; } <?php } ?> #color { color: #568DB0; color: #BFBFBF; color: rgba(255,255,255,1.00); color: #AFF5AC; } .dhx_cal_event_clear { height:40px; white-space: normal; } .dhx_cal_event_line { height:36px; }

<?php echo $welcome; ?>
<input type="button" id="logoutBtn" name="logout" value="Log Out" onclick="window.location.href='logout.php'"/>
<input type="button" id="settingsBtn" name="settings" value="Settings" onclick="window.location.href='settings.php'"/>
<input type="button" id="newUserBtn" name="newUser" value="Add/Edit User" onclick="window.location.href='sched_users.php'"/>
<!--<div id="title">SCHEDULER</div>-->




Your dhxGridStaging variable is local and it cannot be accessed out of your doOnLoad() function.

Yes! Silly me! That was exactly it and is now working. Thank you!