><script type="text/javascript"> >//<![CDATA[ >EditAfterNew('ctl00_TrackerMasterContent_grdTrucks');//]]> ></script> >>
Page.ClientScript.RegisterStartupScript(csType, csName, csScript, true);
I'm guessing your code is being rendered into the output before the rest of the page, which can cause JS errors if you're referencing something in that part of the page.